net/bnxt: fix issue reading sff8436 sfp eeproms

Message ID 20240809102115.629429-1-pdmorrow@gmail.com (mailing list archive)
State Superseded
Delegated to: Ajit Khaparde
Headers
Series net/bnxt: fix issue reading sff8436 sfp eeproms |

Checks

Context Check Description
ci/checkpatch warning coding style issues
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/Intel-compilation success Compilation OK
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS
ci/github-robot: build success github build: passed
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-marvell-Functional success Functional Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-abi-testing pending Testing pending
ci/iol-unit-amd64-testing success Testing PASS
ci/iol-unit-arm64-testing fail Testing issues
ci/iol-compile-amd64-testing pending Testing pending
ci/iol-compile-arm64-testing success Testing PASS
ci/iol-sample-apps-testing success Testing PASS

Commit Message

Peter Morrow Aug. 9, 2024, 10:21 a.m. UTC
From: Peter Morrow <peter@graphiant.com>

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.

Signed-off-by: Peter Morrow <pdmorrow@gmail.com>
---
 drivers/net/bnxt/bnxt_ethdev.c | 1 -
 1 file changed, 1 deletion(-)
  

Patch

diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
index e63febe782..8c4608a1b9 100644
--- a/drivers/net/bnxt/bnxt_ethdev.c
+++ b/drivers/net/bnxt/bnxt_ethdev.c
@@ -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;