]> git.itanic.dy.fi Git - linux-stable/commit
net: pcs: xpcs: fix C73 AN not getting enabled
authorVladimir Oltean <vladimir.oltean@nxp.com>
Tue, 16 May 2023 15:44:10 +0000 (18:44 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 24 May 2023 16:30:18 +0000 (17:30 +0100)
commit9fe84a07f15ea58cf2041cb52f494932b9a76c4b
treeb2d35053bdfe446dea15143e252c05fd0754b287
parent862c6e3e26735247d8a4df41fa2421909c3f4d63
net: pcs: xpcs: fix C73 AN not getting enabled

[ Upstream commit c46e78ba9a7a09da4f192dc8df15c4e8a07fb9e0 ]

The XPCS expects clause 73 (copper backplane) autoneg to follow the
ethtool autoneg bit. It actually did that until the blamed
commit inaptly replaced state->an_enabled (coming from ethtool) with
phylink_autoneg_inband() (coming from the device tree or struct
phylink_config), as part of an unrelated phylink_pcs API conversion.

Russell King suggests that state->an_enabled from the original code was
just a proxy for the ethtool Autoneg bit, and that the correct way of
restoring the functionality is to check for this bit in the advertising
mask.

Fixes: 11059740e616 ("net: pcs: xpcs: convert to phylink_pcs_ops")
Link: https://lore.kernel.org/netdev/ZGNt2MFeRolKGFck@shell.armlinux.org.uk/
Suggested-by: Russell King (Oracle) <linux@armlinux.org.uk>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/pcs/pcs-xpcs.c