From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 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== 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== 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 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 ; Fri, 4 Dec 2026 01:07:52 +0000 (UTC) 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 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 49FAD1F00897; Fri, 4 Dec 2026 01:07:51 +0000 (UTC) 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== Subject: Re: [PATCH net-next 2/4] igb: detect M88E1112 100BASE-FX SGMII mode 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 Date: Fri, 04 Dec 2026 01:07:50 +0000 Message-ID: <179634647087.3146.15351289349583100252@kernel.org> In-Reply-To: <20261203005042.348952-3-anthony.l.nguyen@intel.com> References: <20261203005042.348952-3-anthony.l.nguyen@intel.com> X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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