netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] net: phylink: fix SGMII inband autoneg enable
@ 2022-07-07  9:20 Russell King (Oracle)
  2022-07-09  3:40 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 2+ messages in thread
From: Russell King (Oracle) @ 2022-07-07  9:20 UTC (permalink / raw)
  To: Andrew Lunn, Heiner Kallweit
  Cc: David S. Miller, netdev, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Robert Hancock

When we are operating in SGMII inband mode, it implies that there is a
PHY connected, and the ethtool advertisement for autoneg applies to
the PHY, not the SGMII link. When in 1000base-X mode, then this applies
to the 802.3z link and needs to be applied to the PCS.

Fix this.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/phy/phylink.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c
index 7ed3b2c3a359..54903165be4b 100644
--- a/drivers/net/phy/phylink.c
+++ b/drivers/net/phy/phylink.c
@@ -3166,7 +3166,9 @@ int phylink_mii_c22_pcs_config(struct mdio_device *pcs, unsigned int mode,
 
 	/* Ensure ISOLATE bit is disabled */
 	if (mode == MLO_AN_INBAND &&
-	    linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, advertising))
+	    (interface == PHY_INTERFACE_MODE_SGMII ||
+	     interface == PHY_INTERFACE_MODE_QSGMII ||
+	     linkmode_test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, advertising)))
 		bmcr = BMCR_ANENABLE;
 	else
 		bmcr = 0;
-- 
2.30.2


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH net-next] net: phylink: fix SGMII inband autoneg enable
  2022-07-07  9:20 [PATCH net-next] net: phylink: fix SGMII inband autoneg enable Russell King (Oracle)
@ 2022-07-09  3:40 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 2+ messages in thread
From: patchwork-bot+netdevbpf @ 2022-07-09  3:40 UTC (permalink / raw)
  To: Russell King
  Cc: andrew, hkallweit1, davem, netdev, edumazet, kuba, pabeni,
	robert.hancock

Hello:

This patch was applied to netdev/net-next.git (master)
by Jakub Kicinski <kuba@kernel.org>:

On Thu, 07 Jul 2022 10:20:02 +0100 you wrote:
> When we are operating in SGMII inband mode, it implies that there is a
> PHY connected, and the ethtool advertisement for autoneg applies to
> the PHY, not the SGMII link. When in 1000base-X mode, then this applies
> to the 802.3z link and needs to be applied to the PCS.
> 
> Fix this.
> 
> [...]

Here is the summary with links:
  - [net-next] net: phylink: fix SGMII inband autoneg enable
    https://git.kernel.org/netdev/net-next/c/6d1ce9c03880

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-07-09  3:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07  9:20 [PATCH net-next] net: phylink: fix SGMII inband autoneg enable Russell King (Oracle)
2022-07-09  3:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).