git: 985bef0c4474 - main - ixgbe: retry incoherent SFP identifier reads
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 31 Jul 2026 11:20:57 UTC
The branch main has been updated by kbowling:
URL: https://cgit.FreeBSD.org/src/commit/?id=985bef0c4474abe8ebc3b0def601db8ceff2a690
commit 985bef0c4474abe8ebc3b0def601db8ceff2a690
Author: Stephen Douthit <stephend@silicom-usa.com>
AuthorDate: 2026-07-28 11:09:02 +0000
Commit: Kevin Bowling <kbowling@FreeBSD.org>
CommitDate: 2026-07-31 11:20:02 +0000
ixgbe: retry incoherent SFP identifier reads
FreeBSD's I2C helper already retries failed transactions. Limit this
new outer loop to successful reads with an invalid identifier so that
retry budget is not multiplied.
DPDK commit message
net/ixgbe: retry misbehaving SFP read
Some XGS-PON SFPs ACK I2C reads and return uninitialized data while
their microcontroller boots. A bogus identifier can cause an otherwise
working module to be marked unsupported.
Retry the identifier read several times, checking for both successful
I2C completion and a valid SFP identifier.
Signed-off-by: Stephen Douthit <stephend@silicom-usa.com>
Signed-off-by: Jeff Daly <jeffd@silicom-usa.com>
Reviewed-by: Haiyue Wang <haiyue.wang@intel.com>
Obtained from: DPDK (774263bb4e)
MFC after: 1 week
---
sys/dev/ixgbe/ixgbe_phy.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/sys/dev/ixgbe/ixgbe_phy.c b/sys/dev/ixgbe/ixgbe_phy.c
index 2a735ead9a12..a614ffe50c0d 100644
--- a/sys/dev/ixgbe/ixgbe_phy.c
+++ b/sys/dev/ixgbe/ixgbe_phy.c
@@ -1299,6 +1299,7 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
u8 oui_bytes[3] = {0, 0, 0};
u8 cable_tech = 0;
u8 cable_spec = 0;
+ u8 retries;
u16 enforce_sfp = 0;
static bool warned_once = false;
@@ -1313,9 +1314,22 @@ s32 ixgbe_identify_sfp_module_generic(struct ixgbe_hw *hw)
/* LAN ID is needed for I2C access */
hw->mac.ops.set_lan_id(hw);
- status = hw->phy.ops.read_i2c_eeprom(hw,
- IXGBE_SFF_IDENTIFIER,
- &identifier);
+ /*
+ * Some SFPs with a microcontroller ACK I2C reads before the data
+ * backing them is initialized. Retry successfully completed reads
+ * with invalid identifier values before declaring the module
+ * unsupported. Failed transactions are retried by the I2C helper.
+ */
+ for (retries = 0; retries < 5; retries++) {
+ status = hw->phy.ops.read_i2c_eeprom(hw,
+ IXGBE_SFF_IDENTIFIER, &identifier);
+
+ DEBUGOUT2("status %d, SFF identifier 0x%x\n", status,
+ identifier);
+ if (status != IXGBE_SUCCESS ||
+ identifier == IXGBE_SFF_IDENTIFIER_SFP)
+ break;
+ }
if (status != IXGBE_SUCCESS)
goto err_read_i2c_eeprom;