Skip to content

Commit 45f54a9

Browse files
Russell King (Oracle)kuba-moo
authored andcommitted
net: mvpp2: 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: Russell King (Oracle) <rmk+kernel@armlinux.org.uk> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://lore.kernel.org/r/E1s0OGn-009hgf-G6@rmk-PC.armlinux.org.uk Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 3c668ce commit 45f54a9

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3434,12 +3434,13 @@ static void mvpp2_isr_handle_ptp(struct mvpp2_port *port)
34343434
mvpp2_isr_handle_ptp_queue(port, 1);
34353435
}
34363436

3437-
static void mvpp2_isr_handle_link(struct mvpp2_port *port, bool link)
3437+
static void mvpp2_isr_handle_link(struct mvpp2_port *port,
3438+
struct phylink_pcs *pcs, bool link)
34383439
{
34393440
struct net_device *dev = port->dev;
34403441

34413442
if (port->phylink) {
3442-
phylink_mac_change(port->phylink, link);
3443+
phylink_pcs_change(pcs, link);
34433444
return;
34443445
}
34453446

@@ -3472,7 +3473,7 @@ static void mvpp2_isr_handle_xlg(struct mvpp2_port *port)
34723473
if (val & MVPP22_XLG_INT_STAT_LINK) {
34733474
val = readl(port->base + MVPP22_XLG_STATUS);
34743475
link = (val & MVPP22_XLG_STATUS_LINK_UP);
3475-
mvpp2_isr_handle_link(port, link);
3476+
mvpp2_isr_handle_link(port, &port->pcs_xlg, link);
34763477
}
34773478
}
34783479

@@ -3488,7 +3489,7 @@ static void mvpp2_isr_handle_gmac_internal(struct mvpp2_port *port)
34883489
if (val & MVPP22_GMAC_INT_STAT_LINK) {
34893490
val = readl(port->base + MVPP2_GMAC_STATUS0);
34903491
link = (val & MVPP2_GMAC_STATUS0_LINK_UP);
3491-
mvpp2_isr_handle_link(port, link);
3492+
mvpp2_isr_handle_link(port, &port->pcs_gmac, link);
34923493
}
34933494
}
34943495
}

0 commit comments

Comments
 (0)