Article View: linux.kernel.netdev
Article #26636Re: [PATCH net-next 2/4] igb: detect M88E1112 100BASE-FX SGMII mode
From: netdev-bot+sashiko
Date: Fri, 04 Dec 2026 01:07
Date: Fri, 04 Dec 2026 01:07
191 lines
15122 bytes
15122 bytes
Thank you for your contribution! Sashiko AI review found 5 potential
issue(s) to consider.
Critical: 0 · High: 0 · Medium: 3 · Low: 2
If you believe none of the issues are legitimate, please reply to each
issue of Medium severity or higher and explain why the AI is wrong.
If any of them are legitimate and you plan to respin, please let patchwork
know by including "pw-bot: cr" as a separate line at the end of your reply
(one such reply per series is enough).
- [Medium] The new M88E1112 100BASE-FX path does not set up the same
state as the existing 100BASE-FX path.
- [Medium] The commit message says "The driver only observes the Marvell
mode.
- [Medium] Once the new branch sets hw->phy.media_type =
e1000_media_type_internal_serdes, igb_power_down_link()…
- [Low] The commit message says the patch will "switch the I210 media
type and physical interface setup callback" when the PHY is in…
- [Low] igb_init_phy_params_82575() normally keeps phy->type and
media_type consistent.
--
igb: detect M88E1112 100BASE-FX SGMII mode
This patch decodes the M88E1112 MAC Control 1 mode field in
igb_init_phy_params_82575(). When the PHY reports 100BASE-FX mode, it
switches the media type to internal serdes and the physical interface
setup callback to igb_setup_serdes_link_82575(). The PHY is expected to be
configured by straps or EEPROM before probe.
> diff --git a/drivers/net/ethernet/intel/igb/e1000_82575.c b/drivers/net/ethernet/intel/igb/e1000_82575.c
> index 44a85ad749a4a..72c42d9d6f475 100644
> --- a/drivers/net/ethernet/intel/igb/e1000_82575.c
> +++ b/drivers/net/ethernet/intel/igb/e1000_82575.c
> @@ -264,9 +264,19 @@ static s32 igb_init_phy_params_82575(struct e1000_hw *hw)
> data = FIELD_GET(E1000_M88E1112_MAC_CTRL_1_MODE_MASK,
> data);
> if (data == E1000_M88E1112_AUTO_COPPER_SGMII ||
> - data == E1000_M88E1112_AUTO_COPPER_BASEX)
> + data == E1000_M88E1112_AUTO_COPPER_BASEX) {
> hw->mac.ops.check_for_link =
> igb_check_for_link_media_swap;
> + } else if (data == E1000_M88E1112_100BASE_FX) {
[Severity: Low]
The commit message says:
Decode the M88E1112 MAC Control 1 mode field and switch the I210
media type and physical interface setup callback when the PHY reports
100BASE-FX mode.
Is this branch meant to apply only to I210? There is no hw->mac.type check
here. The only conditions are phy->id == M88E1112_E_PHY_ID and a mode field
of 0.
igb_get_invariants_82575() calls igb_init_phy_params_82575() for every igb
MAC type (82575, 82576, 82580, i350, i354, i210, i211). Any of those boards
with an M88E1112 reporting mode 000 would now take the serdes path.
Could the commit message describe the actual scope? Alternatively, should
this branch check the MAC type?
> + /* The driver only detects this strap/EEPROM
> + * mode. 88E1112 register and EEPROM setup must
> + * be done outside igb before probe/reset.
> + */
[Severity: Medium]
Does this comment still hold in the new mode? The commit message also says
"It does not program the 88E1112 registers or its EEPROM".
Earlier in igb_init_phy_params_82575(), the SGMII path installs:
phy->ops.reset = igb_phy_hw_reset_sgmii_82575;
This branch leaves that in place. igb_power_up_link() calls igb_reset_phy()
whatever the media type is. So on every open, resume and self-test, this
sequence runs:
igb_power_up_link()
igb_reset_phy()
igb_phy_hw_reset_sgmii_82575()
hw->phy.ops.write_reg(hw, 0x1B, 0x8084);
igb_phy_sw_reset(hw);
The detection code also left the page register at 2:
ret_val = phy->ops.write_reg(hw, E1000_M88E1112_PAGE_ADDR, 2);
Wouldn't these writes then land on the 88E1112 page 2 (MAC-side) registers?
In the existing SFP 100BASE-FX path, igb_init_phy_params_82575() returns
early and no reset op is installed, so igb_reset_phy() does nothing there.
Should this branch clear phy->ops.reset and restore page 0?
> + hw->phy.media_type =
> + e1000_media_type_internal_serdes;
[Severity: Medium]
Should dev_spec->_82575.eth_flags.e100_base_fx also be set here?
The existing 100BASE-FX path in igb_set_sfp_media_type_82575() always sets
the flag together with the serdes media type:
} else if (eth_flags->e100_base_fx || eth_flags->e100_base_lx) {
dev_spec->sgmii_active = true;
hw->phy.media_type = e1000_media_type_internal_serdes;
The ethtool code checks the flag, not media_type. In
igb_get_link_ksettings():
if (eth_flags->e100_base_fx || eth_flags->e100_base_lx) {
supported |= SUPPORTED_100baseT_Full;
advertising |= ADVERTISED_100baseT_Full;
}
So in the new mode, ethtool would list only 1000baseKX_Full while the
reported speed is 100.
In igb_set_pauseparam():
/* 100basefx does not support setting link flow control */
if (hw->dev_spec._82575.eth_flags.e100_base_fx)
return -EINVAL;
So flow control changes would now be accepted for this 100BASE-FX link.
They also trigger a reset that reprograms the PCS pause advertisement.
[Severity: Low]
Can leaving phy->type as e1000_phy_m88 lead to copper register reads on this
serdes link?
At the top of igb_init_phy_params_82575(), non-copper media always ends up
with phy_none:
if (hw->phy.media_type != e1000_media_type_copper) {
phy->type = e1000_phy_none;
goto out;
}
This branch changes media_type after phy->type and the M88 ops are already
set. igb_watchdog_task() calls igb_check_downshift() on every link-up, and
igb_check_downshift() only looks at phy->type:
case e1000_phy_m88:
...
offset = M88E1000_PHY_SPEC_STATUS;
mask = M88E1000_PSSR_DOWNSHIFT;
...
ret_val = phy->ops.read_reg(hw, offset, &phy_data);
With the page register still at 2, this reads a page 2 register instead of
the copper PHY Specific Status register.
If bit 5 is set in that register, would "Link Speed was downgraded by
SmartSpeed" be logged on every link-up?
[Severity: Medium]
What powers down the external 88E1112 after this change?
With media_type set to internal serdes, igb_power_down_link() no longer
calls igb_power_down_phy_copper_82575():
if (adapter->hw.phy.media_type == e1000_media_type_copper)
igb_power_down_phy_copper_82575(&adapter->hw);
else
igb_shutdown_serdes_link_82575(&adapter->hw);
igb_shutdown_serdes_link_82575() does not return early in this mode,
because media_type is internal serdes. It only clears PCS_CFG0.PCS_EN and
sets CTRL_EXT.SDP3_DATA ("shutdown the laser"). It never touches the PHY.
On ifdown, or on suspend without WoL, could the 88E1112 stay powered with
its fiber transmitter on, so the link partner still sees link?
SDP3 is also now toggled on every power-down and power-up. On a board with
an on-board 88E1112, that pin is not necessarily an SFP TX_DISABLE pin.
> + hw->mac.ops.setup_physical_interface =
> + igb_setup_serdes_link_82575;
> + }
> }
[ ... ]
--
Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261203005042.348952-1-anthony.l.nguyen%40intel.com
Technical Details
Message-ID:
<179634647087.3146.15351289349583100252@kernel.org>Path:
mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376943-linux-kernel-netdev=dewy.ruReferences:
<20261203005042.348952-3-anthony.l.nguyen@intel.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!feed-eu-txt.newsdeef.eu!feed-eu-ch.newsdeef.eu!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-376943-linux-kernel-netdev=dewy.ru From: netdev-bot+sashiko@kernel.org Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next 2/4] igb: detect M88E1112 100BASE-FX SGMII mode Date: Fri, 04 Dec 2026 01:07:50 +0000 Organization: Usenet Network Message-ID: <179634647087.3146.15351289349583100252@kernel.org> References: <20261203005042.348952-3-anthony.l.nguyen@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="2643723"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:tUgsK0PY/P+q1ciuL8+q6Q9iTmU= sha256:W9PC/VZOwMOx6hlTb57XUaAuRiP4bFD2DUZWZWYou6Q= sha1:kjyFr/FgW3P+Un9SdSb7u4GGfio= sha256:6ry7GtbTRgzvPzGkOi8BEQ4nGIeF0TbyJBQ1QgacRpg= 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 604A9117A9B; Fri, 4 Dec 2026 04:08:16 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -3.639 X-Spam-Status: No, score=-3.639 tagged_above=-9999 required=6.31 tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.24, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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 (2048-bit key) header.d=kernel.org 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 676fARlU2WNq; Fri, 4 Dec 2026 04:08:13 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-376943-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4]) by mail.dewy.ru (Postfix) with ESMTPS id 0D009117A93; Fri, 4 Dec 2026 04:08:02 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sin.lore.kernel.org (Postfix) with ESMTP id C2BEE2217A; Fri, 4 Dec 2026 01:07:59 +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=1796346473; b=cx/7rHofQ7qJtK5+eFXRlhr7OJTl3SE4bCXqTxZntXG72fpYkEImCncGcVv7kQWCz4+Z xpLV7Tby8rdrcVr/I5wdeAXceczrbBXywxSRTj/fSLhH1FOUb2iCi8JYUDKDEWZDoPxZS t0MEnpZv2haJxJhS9D4afY28zRNy/y7rtkEKH9kuMykKjw8/ztAPGnu4hqIH25vIaDgCX 0O6Kx/+PfG4q6NwxzaMh1a3Iw0VaylKeFoafK4hVPmjFKGvemxuXa/Pv6eVQ4vZSCuu5K AXQUQNhZtZlQbYksxltAycPtf/qqXSsZ2AExQ3sSF6lP2iyX6eX9MUWIJwfEhywfi4A== X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796346473; h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc: Date:Message-ID:In-Reply-To:References:X-sashiko-severity: Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id: List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner: Precedence:MIME-Version; bh=A9syVZIh2xCLQ8fMQdrVF2mzUizPoE/OPe8PqL+snps=; b=bKwybX37cDJBeHQvLv8unm+2SOB9siXh93DT8+S+fy/cdHQKv50MYGGQKhne2nNKh+gt SET7CJeE6oMZKCxnCRiytX3HgZuZOhrgMfpRFFa84yltIi+h3xmkkgMhpEXY3wWjVoIgk pyBD/NXQ63frmtDYb0e2zkWqSW1nwTNvJvm1/brnOyFD4bM4xat/KaGveELUWxwNVqqR7 Fe3Vh1jv0pvgzTs2Rc6xuXk7Q+WgFD3UjYspjpzip3dYoUMU7y+6CRQXZpuzCv+yyZOxt cRLXDsZ9QB0R4j9nj/JZEbRE9aHQ6MZx7CFcCSUy5YanX2CP9NOjeT7MrLJNIzlzEvQ== X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XnPJTORG; 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 20F20606A698; Fri, 4 Dec 2026 01:07:53 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XnPJTORG X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796346472; b=ppBJVpwmM3MqvwrbznQrMdPBdEHrGSAxBOGuCkDPERNzozQkHSjh+lUE1dI/cxvFSMO3 JXSoaOY6bYvZ9JONHKEz/qjS2nZc01U7OdurNpPBjtfxtyso6qh1/N+4A+3A66rMbiqVG FkZwmzj90dGzcCoMrErnYjjulgA1hdF6H8SIal9roe314qvAQ8vUHRB2q8nRi0PUeBkh0 4futTPjpOLIrWvEG3B5w0Abm2oBO0bF4U+1g/CU/GvJcubyQzWSOot/uJUtkhvqRs+FfK 8A/LmuBEDlknAbOfc42Ch7WC3gmAPIDf2V0nIZPL4aVTYfysb5vqgnfwiBuBi6flS5Q== X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796346472; h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID: In-Reply-To:References:X-sashiko-severity:Content-Type: Content-Transfer-Encoding:MIME-Version; bh=A9syVZIh2xCLQ8fMQdrVF2mzUizPoE/OPe8PqL+snps=; b=VD5kWtt4abooxg0GuCovoWYHAH5o3QrYNwQu6LQAKweGp9MRJV1otrEN9vLF/3E2j7Dy sOzxVQWzddUYvwRt4+4TkuZ9UQMQmAk3F8qgEK/zsCiShXvCsPdqNW/yTfQZbspXF64hS AuvD9dov2YPrSNEnE8wnB7H74AWWCqtOCK1N8dH1yQL8yXlk1QYRBMFUIvZr9t6PKLVcb gtjfJt7fUfyzoDa9BjogGQK6GjYsRQtRq34KvP2pyfdQRJfxKlC1kLmiX4vzcLAvAhLbS dg4Dw4stcMf3RyvrdTGZU8/wt2s1fphuvmsia2jDW5IID6xaaA7ldv2ExatQVX7HgAQ== X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XnPJTORG; arc=none smtp.remote-ip=100.103.45.18 X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 40BF5606A684 for <netdev@vger.kernel.org>; Fri, 4 Dec 2026 01:07:52 +0000 (UTC) X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49FAD1F00897; Fri, 4 Dec 2026 01:07:51 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796346471; bh=A9syVZIh2xCLQ8fMQdrVF2mzUizPoE/OPe8PqL+snps=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=XnPJTORG+Yni88QamjfKHdFa0XCYc6ArwtcdasUTV86x9sgvpRlzACh3ecBbAtdDL DiPhJdoberc7dy7T8iSdQjXkY0ET7bQfF8u+ndpgb5dvwj/4+f2YI/IUsOx2m4SAZC B9BaFsXHzn2iEJHhq5q1qulcS2qLwGKn1LSNjClHumqH7gFsiWY4XiwoTa8GIZvzcM SvSatqRvLZLS+lU/RnHF+PmrPABIp/sSLyfm/bAJksj9Cz1ARZ4s+OqYP2U6JNZ36G 9agBrQky2U0E5y/INjkvbaQ6QCzQTS4UR38Y/xIKfQ285xc0Ckmsk4daCzP5t8EHtz mGdBj1Mx+pMuA== X-Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, edumazet@kernel.org, andrew+netdev@lunn.ch, willemb@google.com, netdev@vger.kernel.org, paweldembicki@gmail.com, dima.ruinskiy@intel.com, pavankumaryalagada@gmail.com, sx.rinitha@intel.com X-In-Reply-To: <20261203005042.348952-3-anthony.l.nguyen@intel.com> X-sashiko-severity: Medium 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