From nobody Fri Jul 31 11:20:57 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4hBNt15Jqkz6n3LD for ; Fri, 31 Jul 2026 11:20:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "YR1" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hBNt12swvz472J for ; Fri, 31 Jul 2026 11:20:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785496857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cj+WnycxUfO+dt3V3BryS96cax8puOXvT4JqeuvOv/w=; b=M/ib223bLgatAZJ7ftm3t93JQEzt0f9AJESgnzedkW1YbROjZM9vPASnwkkf9nsiOzZHfb mcncToZXU5qTAmUJwHelAN6f/SLY9QmRePPz8hSwIUI0JbGq3Gf+YibmAFOJtQmRhEA5hU ty2vn81zileeh/1Bltomh8p5Qo2QjsKlt7FWRkhhqaTHJl498FRLSTlvenJbmnjP/EqyJm odcxjbggEPWE8TCGamPTwxXe313+v2CSj7egKzop+ooQDC5O2p/BaxtWBhZ0aH1WYmWHwm Ao7fTN75/1IP3fDKlZDhM2N3lQ2dgzrXqTfwpXyJ+jQvptOdk7qsgrqo3oRmfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1785496857; a=rsa-sha256; cv=none; b=gqgCT0zc1JKpoMKcHhc4D1lPRP6m1nhKvtMKEbyJL2Oqma4aV9V7BGKQliFX5WLcHOAWG5 oTb8L9wC4MgpBxJmGUDnAbqgvBtLmOdfy63TlciQaagsKzyEWMn63DlfjrnqY/3DtdC0vY UKRwX4nbtFVZdpG1UGmDpcVvgxqabfxFmm5h/ZepQsduo7/Q9NwgvzRx4Zy5zTE8BLhvtv UCbIN0B+Ch69V2OcYrHrpjwoNjaQcQ99ZP9zIWWQ0Bfn+TKMTO6t+80ybeP3noNQIFBnsM eMrlGy6XRS0GdtjCvhFFpSlHc5W1p6sna5MGhRbF+iS8iNWmT2pWexJNFmcuIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1785496857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cj+WnycxUfO+dt3V3BryS96cax8puOXvT4JqeuvOv/w=; b=GhkBswojSZrr/MP13mEJjyDTZ0Ek8chK6NvYPvL7dOJWaQ2caI5vgMDlWJeNj6fNKipo/d /hzXKFd5G3XCcUgnw67H1g1FX8SgbBnNYCGqCba3h1FmTnQw8VMU1nTqHuHQgSdUw9ClgL jlvYDPUmJ7xVuDgBfxi2yI2Rv7YglvEFi0V02LuSDWwl3ewIRi9NB7fb6445sqwdBSx3nS B3c0ECxnBlyzAQhC0X6ceSWuC4JtXh5jMVzCEHPBEIeh31M6f2q+CUSEWJ/fyE3+Gi2QMp 0jn3pkqEiKFAnhb/tZXI7QKABaYfs9s5diU7MELzOpMpdn33ZwKR9mpJwqzBkA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hBNt11QvpzxPp for ; Fri, 31 Jul 2026 11:20:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3e1b5 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 31 Jul 2026 11:20:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Stephen Douthit From: Kevin Bowling Subject: git: 985bef0c4474 - main - ixgbe: retry incoherent SFP identifier reads List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 985bef0c4474abe8ebc3b0def601db8ceff2a690 Auto-Submitted: auto-generated Date: Fri, 31 Jul 2026 11:20:57 +0000 Message-Id: <6a6c8519.3e1b5.36834deb@gitrepo.freebsd.org> The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=985bef0c4474abe8ebc3b0def601db8ceff2a690 commit 985bef0c4474abe8ebc3b0def601db8ceff2a690 Author: Stephen Douthit AuthorDate: 2026-07-28 11:09:02 +0000 Commit: Kevin Bowling 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 Signed-off-by: Jeff Daly Reviewed-by: Haiyue Wang 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;