Commit e47e5e85 authored by Russell King (Oracle)'s avatar Russell King (Oracle) Committed by Jakub Kicinski

net: prestera: use phylink_pcs_change() to report PCS link change events

Use phylink_pcs_change() when reporting changes in PCS link state to
phylink as the interrupts are informing us about changes to the PCS
state.
Signed-off-by: default avatarRussell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: default avatarSimon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/E1s0OGx-009hgr-NP@rmk-PC.armlinux.org.ukSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 21c8e45a
...@@ -821,7 +821,7 @@ static void prestera_port_handle_event(struct prestera_switch *sw, ...@@ -821,7 +821,7 @@ static void prestera_port_handle_event(struct prestera_switch *sw,
if (port->state_mac.oper) { if (port->state_mac.oper) {
if (port->phy_link) if (port->phy_link)
phylink_mac_change(port->phy_link, true); phylink_pcs_change(&port->phylink_pcs, true);
else else
netif_carrier_on(port->dev); netif_carrier_on(port->dev);
...@@ -829,7 +829,7 @@ static void prestera_port_handle_event(struct prestera_switch *sw, ...@@ -829,7 +829,7 @@ static void prestera_port_handle_event(struct prestera_switch *sw,
queue_delayed_work(prestera_wq, caching_dw, 0); queue_delayed_work(prestera_wq, caching_dw, 0);
} else { } else {
if (port->phy_link) if (port->phy_link)
phylink_mac_change(port->phy_link, false); phylink_pcs_change(&port->phylink_pcs, false);
else if (netif_running(port->dev) && netif_carrier_ok(port->dev)) else if (netif_running(port->dev) && netif_carrier_ok(port->dev))
netif_carrier_off(port->dev); netif_carrier_off(port->dev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment