Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1670998

[PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround

From Zach Brown <zach.brown@ni.com>
Newsgroups linux.kernel
Subject [PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround
Date 2017-06-20 19:50 +0200
Message-ID <tUvrQ-3dH-23@gated-at.bofh.it> (permalink)
Organization linux.* mail to news gateway

Show all headers | View raw


The commit ("net/phy: micrel: Add workaround for bad autoneg") fixes an
autoneg failure case by resetting the hardware. This turns off
intterupts. Things will work themselves out if the phy polls, as it will
figure out it's state during a poll. However if the phy uses only
intterupts, the phy will stall, since interrupts are off. This patch
fixes the issue by calling config_intr after resetting the phy.

Fixes: d2fd719bcb0e ("net/phy: micrel: Add workaround for bad autoneg ")
Signed-off-by: Zach Brown <zach.brown@ni.com>
---
v2:
 * Check phy_intterupt_is_valid before calling config_intr

 drivers/net/phy/micrel.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 9365b07..fdb43dd 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -620,6 +620,8 @@ static int ksz9031_read_status(struct phy_device *phydev)
 	if ((regval & 0xFF) == 0xFF) {
 		phy_init_hw(phydev);
 		phydev->link = 0;
+		if (phydev->drv->config_intr && phy_interrupt_is_valid(phydev))
+			phydev->drv->config_intr(phydev);
 	}
 
 	return 0;
-- 
2.7.4

Back to linux.kernel | Previous | NextNext in thread | Find similar | Unroll thread


Thread

[PATCH v2] net/phy: micrel: configure intterupts after autoneg workaround Zach Brown <zach.brown@ni.com> - 2017-06-20 19:50 +0200
  Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg  workaround Florian Fainelli <f.fainelli@gmail.com> - 2017-06-20 23:50 +0200
  Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg  workaround Andrew Lunn <andrew@lunn.ch> - 2017-06-20 23:50 +0200
  Re: [PATCH v2] net/phy: micrel: configure intterupts after autoneg  workaround David Miller <davem@davemloft.net> - 2017-06-22 17:10 +0200

csiph-web