]> Git Repo - linux.git/commit
net: phylink: ensure PHY momentary link-fails are handled
authorRussell King (Oracle) <[email protected]>
Tue, 12 Nov 2024 16:20:00 +0000 (16:20 +0000)
committerJakub Kicinski <[email protected]>
Thu, 14 Nov 2024 02:52:54 +0000 (18:52 -0800)
commit671154f174e0e7f242507cd074497661deb41bfd
treec85141494643ee5fe231cde128174da27fb7b659
parent7d2253d93327de257590b88c86eeebfe7ff88d0c
net: phylink: ensure PHY momentary link-fails are handled

Normally, phylib won't notify changes in quick succession. However, as
a result of commit 3e43b903da04 ("net: phy: Immediately call
adjust_link if only tx_lpi_enabled changes") this is no longer true -
it is now possible that phy_link_down() and phy_link_up() will both
complete before phylink's resolver has run, which means it'll miss that
pl->phy_state.link momentarily became false.

Rename "mac_link_dropped" to be more generic "link_failed" since it will
cover more than the MAC/PCS end of the link failing, and arrange to set
this in phylink_phy_change() if we notice that the PHY reports that the
link is down.

This will ensure that we capture an EEE reconfiguration event.

Fixes: 3e43b903da04 ("net: phy: Immediately call adjust_link if only tx_lpi_enabled changes")
Signed-off-by: Russell King (Oracle) <[email protected]>
Reviewed-by: Oleksij Rempel <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
drivers/net/phy/phylink.c
This page took 0.058979 seconds and 4 git commands to generate.