diff options
author | Zach Brown <[email protected]> | 2017-06-20 12:48:11 -0500 |
---|---|---|
committer | David S. Miller <[email protected]> | 2017-06-22 11:05:16 -0400 |
commit | b866203d872d5deeafcecd25ea429d6748b5bd56 (patch) | |
tree | df6fda8f48b3a5aea7e0ffe50a5c631fe44393f9 | |
parent | 48b6bbef9a1789f0365c1a385879a1fea4460016 (diff) |
net/phy: micrel: configure intterupts after autoneg workaround
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 <[email protected]>
Reviewed-by: Andrew Lunn <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
-rw-r--r-- | drivers/net/phy/micrel.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index b9252b8d81ff..8b2038844ba9 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -619,6 +619,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; |