Skip to content

Commit

Permalink
net: prestera: use phylink_pcs_change() to report PCS link change events
Browse files Browse the repository at this point in the history
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: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://lore.kernel.org/r/E1s0OGx-009hgr-NP@rmk-PC.armlinux.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Russell King (Oracle) authored and Jakub Kicinski committed Apr 30, 2024
1 parent 21c8e45 commit e47e5e8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/net/ethernet/marvell/prestera/prestera_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -821,15 +821,15 @@ static void prestera_port_handle_event(struct prestera_switch *sw,

if (port->state_mac.oper) {
if (port->phy_link)
phylink_mac_change(port->phy_link, true);
phylink_pcs_change(&port->phylink_pcs, true);
else
netif_carrier_on(port->dev);

if (!delayed_work_pending(caching_dw))
queue_delayed_work(prestera_wq, caching_dw, 0);
} else {
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))
netif_carrier_off(port->dev);

Expand Down

0 comments on commit e47e5e8

Please sign in to comment.