|
@@ -2557,6 +2557,7 @@ void t4_get_regs(struct adapter *adap, void *buf, size_t buf_size)
|
|
}
|
|
}
|
|
|
|
|
|
#define EEPROM_STAT_ADDR 0x7bfc
|
|
#define EEPROM_STAT_ADDR 0x7bfc
|
|
|
|
+#define VPD_SIZE 0x800
|
|
#define VPD_BASE 0x400
|
|
#define VPD_BASE 0x400
|
|
#define VPD_BASE_OLD 0
|
|
#define VPD_BASE_OLD 0
|
|
#define VPD_LEN 1024
|
|
#define VPD_LEN 1024
|
|
@@ -2594,6 +2595,15 @@ int t4_get_raw_vpd_params(struct adapter *adapter, struct vpd_params *p)
|
|
if (!vpd)
|
|
if (!vpd)
|
|
return -ENOMEM;
|
|
return -ENOMEM;
|
|
|
|
|
|
|
|
+ /* We have two VPD data structures stored in the adapter VPD area.
|
|
|
|
+ * By default, Linux calculates the size of the VPD area by traversing
|
|
|
|
+ * the first VPD area at offset 0x0, so we need to tell the OS what
|
|
|
|
+ * our real VPD size is.
|
|
|
|
+ */
|
|
|
|
+ ret = pci_set_vpd_size(adapter->pdev, VPD_SIZE);
|
|
|
|
+ if (ret < 0)
|
|
|
|
+ goto out;
|
|
|
|
+
|
|
/* Card information normally starts at VPD_BASE but early cards had
|
|
/* Card information normally starts at VPD_BASE but early cards had
|
|
* it at 0.
|
|
* it at 0.
|
|
*/
|
|
*/
|