]> git.itanic.dy.fi Git - linux-stable/commit
net: pcs: lynx: fix lynx_pcs_link_up_sgmii() not doing anything in fixed-link mode
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 11 Aug 2023 11:53:52 +0000 (14:53 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sun, 13 Aug 2023 11:32:44 +0000 (12:32 +0100)
commit2f4503f94c5d81d1589842bfb457be466c8c670b
treea4d050389f51f1b8cd02b637ca9886509428a9c4
parent80c2c7b3e837d69669bc0106a7ba0908c10d5b95
net: pcs: lynx: fix lynx_pcs_link_up_sgmii() not doing anything in fixed-link mode

lynx_pcs_link_up_sgmii() is supposed to update the PCS speed and duplex
for the non-inband operating modes, and prior to the blamed commit, it
did just that, but a mistake sneaked into the conversion and reversed
the condition.

It is easy for this to go undetected on platforms that also initialize
the PCS in the bootloader, because Linux doesn't reset it (although
maybe it should). The nature of the bug is that phylink will not touch
the IF_MODE_HALF_DUPLEX | IF_MODE_SPEED_MSK fields when it should, and
it will apparently keep working if the previous values set by the
bootloader were correct.

Fixes: c689a6528c22 ("net: pcs: lynx: update PCS driver to use neg_mode")
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/pcs/pcs-lynx.c