mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
net: pcs: xpcs: fix C73 AN not getting enabled
[ Upstream commitc46e78ba9a] 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:11059740e6("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
ee44bacf46
commit
fdc5c8fb57
@@ -881,7 +881,7 @@ int xpcs_do_config(struct dw_xpcs *xpcs, phy_interface_t interface,
|
|||||||
|
|
||||||
switch (compat->an_mode) {
|
switch (compat->an_mode) {
|
||||||
case DW_AN_C73:
|
case DW_AN_C73:
|
||||||
if (phylink_autoneg_inband(mode)) {
|
if (test_bit(ETHTOOL_LINK_MODE_Autoneg_BIT, advertising)) {
|
||||||
ret = xpcs_config_aneg_c73(xpcs, compat);
|
ret = xpcs_config_aneg_c73(xpcs, compat);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|||||||
Reference in New Issue
Block a user