Skip to content

Commit f3f2364

Browse files
Russell KingJakub Kicinski
authored andcommitted
net: marvell: mvpp2: phylink requires the link interrupt
phylink requires the MAC to report when its link status changes when operating in inband modes. Failure to report link status changes means that phylink has no idea when the link events happen, which results in either the network interface's carrier remaining up or remaining permanently down. For example, with a fiber module, if the interface is brought up and link is initially established, taking the link down at the far end will cut the optical power. The SFP module's LOS asserts, we deactivate the link, and the network interface reports no carrier. When the far end is brought back up, the SFP module's LOS deasserts, but the MAC may be slower to establish link. If this happens (which in my tests is a certainty) then phylink never hears that the MAC has established link with the far end, and the network interface is stuck reporting no carrier. This means the interface is non-functional. Avoiding the link interrupt when we have phylink is basically not an option, so remove the !port->phylink from the test. Fixes: 4bb0432 ("net: mvpp2: phylink support") Tested-by: Sven Auhagen <sven.auhagen@voleatech.de> Tested-by: Antoine Tenart <antoine.tenart@bootlin.com> Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk> Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
1 parent cd1263b commit f3f2364

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3680,7 +3680,7 @@ static int mvpp2_open(struct net_device *dev)
36803680
valid = true;
36813681
}
36823682

3683-
if (priv->hw_version == MVPP22 && port->link_irq && !port->phylink) {
3683+
if (priv->hw_version == MVPP22 && port->link_irq) {
36843684
err = request_irq(port->link_irq, mvpp2_link_status_isr, 0,
36853685
dev->name, port);
36863686
if (err) {

0 commit comments

Comments
 (0)