From: netdev-bot+sashiko@kernel.org
To: anthony.l.nguyen@intel.com
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
Subject: Re: [PATCH net-next 2/4] igb: detect M88E1112 100BASE-FX SGMII mode
Date: Fri, 04 Dec 2026 01:07:50 +0000 [thread overview]
Message-ID: <179634647087.3146.15351289349583100252@kernel.org> (raw)
In-Reply-To: <20261203005042.348952-3-anthony.l.nguyen@intel.com>
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
next prev parent reply other threads:[~2026-12-04 1:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-03 0:50 [PATCH net-next 0/4][pull request] Intel Wired LAN Driver Updates 2026-12-02 (igc, igb, e100) Tony Nguyen
2026-12-03 0:50 ` [PATCH net-next 1/4] igc: Support ACPI-based MAC passthrough Tony Nguyen
2026-12-04 1:07 ` netdev-bot+sashiko
2026-12-04 1:28 ` Andrew Lunn
2026-12-03 0:50 ` [PATCH net-next 2/4] igb: detect M88E1112 100BASE-FX SGMII mode Tony Nguyen
2026-12-04 1:07 ` netdev-bot+sashiko [this message]
2026-12-03 0:50 ` [PATCH net-next 3/4] igb: read SFP module EEPROM through igb_read_sfp_data_byte Tony Nguyen
2026-12-04 1:07 ` netdev-bot+sashiko
2026-12-03 0:50 ` [PATCH net-next 4/4] e100: prevent shift-out-of-bounds in EEPROM access Tony Nguyen
2026-12-04 1:07 ` netdev-bot+sashiko
2026-12-03 0:53 ` [PATCH net-next 0/4][pull request] Intel Wired LAN Driver Updates 2026-12-02 (igc, igb, e100) netdev-bot+sinfo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=179634647087.3146.15351289349583100252@kernel.org \
--to=netdev-bot+sashiko@kernel.org \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=dima.ruinskiy@intel.com \
--cc=edumazet@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pavankumaryalagada@gmail.com \
--cc=paweldembicki@gmail.com \
--cc=sx.rinitha@intel.com \
--cc=willemb@google.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox