Skip to contentSkip to conversation

net: phy: micrel: remove unnecessary duplicate interrupt enable

PATCH In review Russell King 2 participants 2 messages Dec 12, 2017 – Dec 14, 2017

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net: phy: micrel: remove unnecessary duplicate interrupt enable

Now that we call phy_resume() before enabling interrupts, the workaround in micrel is no longer required.

---
This depends on the previous "net: phy: fix resume handling" patch, but is not necessary to be a part of it. Since kszphy_resume() is used for PHYs which I don't have, I can't test this, so I decided to keep it separate. Can we get it tested on KSZ8081, KSZ8091 or KSZ9031 PHYs?

 drivers/net/phy/micrel.c | 15 +--------------
 1 file changed, 1 insertion(+), 14 deletions(-)
drivers/net/phy/micrel.c +1 -14
index fdb43dd9b5cd..9e9438caa2b7 100644
@@ -711,22 +711,9 @@ static int kszphy_suspend(struct phy_device *phydev)
 
 static int kszphy_resume(struct phy_device *phydev)
 {
-	int ret;
-
 	genphy_resume(phydev);
 
-	ret = kszphy_config_reset(phydev);
-	if (ret)
-		return ret;
-
-	/* Enable PHY Interrupts */
-	if (phy_interrupt_is_valid(phydev)) {
-		phydev->interrupts = PHY_INTERRUPT_ENABLED;
-		if (phydev->drv->config_intr)
-			phydev->drv->config_intr(phydev);
-	}
-
-	return 0;
+	return kszphy_config_reset(phydev);
 }
 
 static int kszphy_probe(struct phy_device *phydev)
Signature · 1 line
2.7.4
maintainer
#1 lore raw

From: Russell King <[email protected]>
Date: Tue, 12 Dec 2017 11:02:12 +0000

Quoted 9 lines

Now that we call phy_resume() before enabling interrupts, the workaround in micrel is no longer required.

---
This depends on the previous "net: phy: fix resume handling" patch, but is not necessary to be a part of it. Since kszphy_resume() is used for PHYs which I don't have, I can't test this, so I decided to keep it separate. Can we get it tested on KSZ8081, KSZ8091 or KSZ9031 PHYs?

Russell, please repost this once someone does some testing.

Yes, I realize it can be difficult to obtain this, but please do your best.