Blob Blame History Raw
From: Thomas Bogendoerfer <tbogendoerfer@suse.de>
Date: Thu, 24 Jan 2019 12:04:41 +0100
Subject: net: mvpp2: fix condition for setting up link interrupt
Patch-mainline: not yet, under development
References: bsc#1117016

Setup link interrupt if there is a phylink set up and not the other way.

Fixes: 4bb043262878 ("net: mvpp2: phylink support")

Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
---
 drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
+++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
@@ -3421,7 +3421,8 @@ static int mvpp2_open(struct net_device
 		valid = true;
 	}
 
-	if (priv->hw_version == MVPP22 && port->link_irq && !port->phylink) {
+	if (priv->hw_version == MVPP22 && port->link_irq &&
+		(!port->phylink || !port->has_phy)) {
 		err = request_irq(port->link_irq, mvpp2_link_status_isr, 0,
 				  dev->name, port);
 		if (err) {