Article View: linux.kernel.netdev
Article #18797Re: [PATCH net v2] net: sfp: skip PHY probe on bridge-less OEM SFP-10G-T revisions A and B
From: Andrew Lunn
Date: Wed, 18 Nov 2026 23:16
Date: Wed, 18 Nov 2026 23:16
72 lines
11817 bytes
11817 bytes
On Wed, Nov 18, 2026 at 11:14:50PM +0100, Daniel Pawlik wrote:
> "OEM SFP-10G-T" modules with vendor revision "A" have no RollBall
> I2C-to-MDIO bridge: page 3 of the 0x51 EEPROM passively echoes written
> bytes, so every RollBall command times out. With instrumented mdio-i2c,
> the CMD register reads back exactly the written command byte (0x02)
> forever, with no DONE and no I2C errors. 0x56 reads back all 0xff, so the
> PHY is not reachable at all. A genuine RollBall module with the same
> vendor and part number (revision "02", AQR113C PHY) on the same board
> answers DONE on the first poll and its PHY attaches within ~2 seconds.
> A rev B module with an RTL8261BE PHY, reported on the OpenWrt tracker,
> hits the same RollBall timeouts. The bridge probe added by
> commit 8fe125892f40 ("net: phy: sfp: probe for RollBall I2C-to-MDIO
> bridge in mdio-i2c"), since reverted, found no bridge on it, after
> which the module worked.
> That module reaches this quirk entry only because its part number is
> "SFP-10G-T" at that point: it is a rate-adapting module which reports
> "SFP-10G-T" with a 2.5G or faster peer and "SFP-10G-T-I" with a 1G
> peer, and only the former matches this entry, which is the sole entry
> forcing RollBall on it. The "SFP-10G-T-I" variant matches no quirk and
> keeps the default behaviour either way.
>
> Because the SFP-10G-T quirk forces RollBall, the kernel retries the PHY
> probe 25 times at ~21 seconds per attempt, i.e. for over nine minutes,
> before giving up and falling back to inband mode. Each attempt runs from
> sfp_timeout() with rtnl_lock held, so for the whole window every rtnl
> user on the system stalls in ~21 second chunks, including the state
> machines of other SFP cages: insertion and removal of a module in another
> cage is only processed after the current attempt ends. In one test, a
> module pulled from the other cage kept being polled by phylib until the
> attempt ended, triggering a WARN from phy_error_precise().
>
> Give the SFP-10G-T entry its own fixup that skips the PHY probe for
> revisions "A" and "B", while keeping the forced extended compliance code
> so that the module still links up in 10GBASE-R inband mode as before.
> Other revisions keep the RollBall fixup unchanged.
>
> Tested on a Banana Pi BPI-R4 with rev A and rev 02 modules: the rev A
> module links up at 10G ~16 s after insertion instead of over nine
> minutes, and the rev 02 module is unaffected. No rev B module was
> available for testing; its match is based on the report above.[1]
>
> [1] https://github.com/openwrt/openwrt/pull/22910
>
> Fixes: 324e88cbe3b7 ("net: sfp: add support for multigig RollBall transceivers")
> Signed-off-by: Daniel Pawlik <pawlik.dan@gmail.com>
> Link: https://lore.kernel.org/netdev/20260624084814.20972-1-petr.wozniak@gmail.com/
If i'm reading this correctly, it never worked before? So this is not
a regression? I don't think this is net material, it should go via
net-next.
> +static size_t sfp_strlen(const char *str, size_t maxlen)
> +{
> + size_t size, i;
> +
> + /* Trailing characters should be filled with space chars, but
> + * some manufacturers can't read SFF-8472 and use NUL.
> + */
> + for (i = 0, size = 0; i < maxlen; i++)
> + if (str[i] != ' ' && str[i] != '\0')
> + size = i + 1;
> +
> + return size;
> +}
When sending to net-next, you can move this function in one patch, and
then make use of it in the next patch. That makes the code easier to
review. Lots of small patches, with good commit messages, which are
obviously correct.
Andrew
Technical Details
Message-ID:
<4ddef89e-d6aa-4d6f-bc8d-997a9ad781b9@lunn.ch>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366500-linux-kernel-netdev=dewy.ruReferences:
<20261118221450.1764790-1-pawlik.dan@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366500-linux-kernel-netdev=dewy.ru From: andrew@lunn.ch (Andrew Lunn) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net v2] net: sfp: skip PHY probe on bridge-less OEM SFP-10G-T revisions A and B Date: Thu, 19 Nov 2026 00:16:20 +0100 Organization: Usenet Network Message-ID: <4ddef89e-d6aa-4d6f-bc8d-997a9ad781b9@lunn.ch> References: <20261118221450.1764790-1-pawlik.dan@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: usenet.network; logging-data="2725975"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:woQYPD2YGdD5zOPsuFtBLxGtSvc= sha256:RDumvSVf/Iw4OLRT0pHSQNI8ik01t36ZLD9o6YcQPx0= sha1:zzy884hegmdbSNY6a24PeESkTIg= sha256:HO4URsLtkGCiKgsGub51b6svq3EZC8uS55bkhZByJgQ= Content-Disposition: inline List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id 17216115411; Thu, 19 Nov 2026 02:16:49 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.15 X-Spam-Status: No, score=-3.15 tagged_above=-9999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=lunn.ch X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HjMC-cdeF-vL; Thu, 19 Nov 2026 02:16:44 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-366500-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=lunn.ch X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mail.dewy.ru (Postfix) with ESMTPS id 7E03011537B; Thu, 19 Nov 2026 02:16:35 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 24F1F70317D; Wed, 18 Nov 2026 23:16:35 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795043792; b=coDDgOfNDcAp+aAPoCI0iRQibEstNhYtAZoC7RfGmjTVHZogbKrW0Dl6hznY+vq9BHf9 HgcYNfVJN711n7lt2H9mKC4FpZglfrvIIr2+znInmnTfWIKxoNNPMNUO+VLE+FWZKVMQm TT9Ye/eI0uMTEgCnrlqUaAv7Q9ac3r7kyuE3HQ4JAFRCLEaYxTizbB51I/kmjBKfuWZIY y65luU/dcD2ndZQxXxKQfQbGGkKZJ4i9SYHvBVJhHQ7TkwNzbavUoJ8L57Ni4PW+Remlk 5gJZu/IWJH8SLcMy8Ov5+v0yUUgCwNNwuyIBrEPf440zBHgKEP89aD8XMgO2XQ//DSQ== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795043792; h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date: From:To:Cc:Subject:Message-ID:References:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version:Content-Type:Content-Disposition:In-Reply-To; bh=xiiydflEB91O48Fmb7pHblMVYGyM8PHtmi+Z46i+1H8=; b=EyKL8aBpvAA4kw20s4C2pUwwOT3tZVNQ91hC3TsELFe5eats+EMGg8PL/vyPYEatu21N hx3LWA1DRx1sCT/sokIOS7jDuhYf+4WZ13SDIWIdb9Muy3wIcpy8gGrK/mEq+g8a3Wr/b pVEaNbTfku0jf1voqQmBx2lWAulWaOhHcV5FVFjheKyC/khsT9NcZHwExvaSzzk1/iLC5 IZlinFz0E7w/s3qrfDbylCBWfwuG1LL65JzoLoyMFhEDD87hQpyJYrIRGAFc31anVEBwe QMcRZsic/N6OvJ4lGMiqWh2cxWTto1TZn8VeRuCpBNe8PXatvU/hgWybHxU9MWy8KAg== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=LutoQfhC; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 X-Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 24668606A336; Wed, 18 Nov 2026 23:16:32 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=LutoQfhC X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=156.67.10.101 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795043791; b=lJlZ5mYyHFGX3T/pymiZBagZNTV57fE+lj44Bb1qpxj4e6TvfwYn2TEz1loNkKUboFzk zHhJfMU+yR8i8Vi398rQjHPA1WAnhYDwIgYZJg+m4ng4KTAytWP0CPjxw8YNUgRxOd0dZ TkL+I6LwQRmUng6MwvmsLe8nSQQ70VmJX0IoOctUE1Jn8BCCUl2uZcX56e4WYs6hTTyfS 10gIjJQFUvOUDWFfbusRclrQqdZER47DPMTNyYGqP/OPhLYfsRgsMuZc1L9cn+sSZxmGI Y1Tja7Y/5MNPwMY45SC4+JU1Jz9pF+3Ma06+3S4dOcOSiWbrvYrHyt5G09wVvOFNzjQ== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795043791; h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject: Message-ID:References:MIME-Version:Content-Type:Content-Disposition: In-Reply-To; bh=xiiydflEB91O48Fmb7pHblMVYGyM8PHtmi+Z46i+1H8=; b=xBnQfgctifrXpZC0b17aeU7vpHQmePIWy99MXI5dNJKeZBJzWZsb9BteA5P06rCVgQV0 TrBKMiPB9Gls1aNs3367D4zZgNIk9xWxaOjmkvx/Acy7q01hGSLIzYlLX6SPjKf41QDv9 pCD3l6BhJHi6PgKdf09X6Rv+/qqrQwkG4t60xLNR78NMYG+K64foQzngniwYCSVxqFwY8 mwGMrhlYlCtNAnacCKpJQ3RMaRs+iLNxO82STwHmMk2u4atjy4aZjfOD3PMh22nrRMQuj 9d8XRBdoYohOye2DIEXcBvd89ZQNz75x5uyNYiFfGAqkpC8kCtuWXjynyiulmH7EghQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=lunn.ch; spf=pass smtp.mailfrom=lunn.ch; dkim=pass header.d=lunn.ch header.i=@lunn.ch header.a=rsa-sha256 header.s=20171124 header.b=LutoQfhC; arc=none smtp.remote-ip=156.67.10.101 X-Received: from vps0.lunn.ch (vps0.lunn.ch [156.67.10.101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 06E21606A32A for <netdev@vger.kernel.org>; Wed, 18 Nov 2026 23:16:25 +0000 (UTC) X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 06E21606A32A X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lunn.ch X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lunn.ch X-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=xiiydflEB91O48Fmb7pHblMVYGyM8PHtmi+Z46i+1H8=; b=LutoQfhCWTB+Vb+z9TekYwKr7H GWTVWumAwyTkxLRfFlptBdZ61SzhfTKDf/3tGI1H51bYMzRS1kJQNGbdfXFyBLM3PCo137+nr6+MT CWrxidRoUB7iJ2BFNgqtxQl7EPMbVR9vCAKh4nRBXSV7nnBupTkaZttdKlFC5oNpiiLg=; X-Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from <andrew@lunn.ch>) id 1xTot2-00HWXF-Lg; Thu, 19 Nov 2026 00:16:20 +0100 X-Cc: linux@armlinux.org.uk, netdev@vger.kernel.org, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, horms@kernel.org, petr.wozniak@gmail.com, maxime.chevallier@bootlin.com, olek2@wp.pl, hkallweit1@gmail.com X-Mailing-List: netdev@vger.kernel.org X-List-Post: <mailto:netdev@vger.kernel.org> X-List-Help: <mailto:netdev+help@vger.kernel.org> X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-List-Owner: <mailto:netdev+owner@vger.kernel.org> X-Precedence: list X-In-Reply-To: <20261118221450.1764790-1-pawlik.dan@gmail.com>