net/bnxt: fix issue reading sff8436 sfp eeproms
PATCH v2 1/1 net/bnxt: fix issue reading sff8436 sfp eeproms
From: Peter Morrow <[email protected]>
If a SFP which supports SFF-8436 is present then currently the DDM information present in the eeprom is not read. Furthermore bnxt_get_module_eeprom() will return -EINVAL for these eeproms since the length of these eeproms is 512 bytes but we are only ever selecting 2 pages (256 bytes) to read.
---
Corrected sob email address.
drivers/net/bnxt/bnxt_ethdev.c | 1 - 1 file changed, 1 deletion(-)
drivers/net/bnxt/bnxt_ethdev.c +0 -1
@@ -4130,7 +4130,6 @@ static int bnxt_get_module_eeprom(struct rte_eth_dev *dev,switch (module_info[0 ]) {case SFF_MODULE_ID_SFP : - module_info[SFF_DIAG_SUPPORT_OFFSET ] =0 ;if (module_info[SFF_DIAG_SUPPORT_OFFSET ]) { pg_addr[2 ] =I2C_DEV_ADDR_A2 ; pg_addr[3 ] =I2C_DEV_ADDR_A2 ;
Signature · 1 line
2.39.2
Quoted 11 lines · Peter Morrow
From: Peter Morrow <[email protected]>
If a SFP which supports SFF-8436 is present then currently the DDM information present in the eeprom is not read. Furthermore
bnxt_get_module_eeprom()will return-EINVALfor these eeproms since the length of these eeproms is 512 bytes but we are only ever selecting 2 pages (256 bytes) to read.Signed-off-by Peter Morrow <[email protected]>
Patch applied to dpdk-next-net-brcm for-next-net branch.
Quoted 21 lines
---
Corrected sob email address.drivers/net/bnxt/bnxt_ethdev.c | 1 - 1 file changed, 1 deletion(-)drivers/net/bnxt/bnxt_ethdev.c +0
-2@@ -4130,7 +4130,6 @@ static int bnxt_get_module_eeprom(struct rte_eth_dev *dev,switch (module_info[0 ]) {case SFF_MODULE_ID_SFP : - module_info[SFF_DIAG_SUPPORT_OFFSET ] =0 ;if (module_info[SFF_DIAG_SUPPORT_OFFSET ]) { pg_addr[2 ] =I2C_DEV_ADDR_A2 ; pg_addr[3 ] =I2C_DEV_ADDR_A2 ; --2.39.2