summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorZach Brown <zach.brown@ni.com>2017-06-20 12:48:11 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-07-21 07:42:17 +0200
commit3f7e07c37ade390391a336e1f2e4c4d5a073c4a8 (patch)
tree0f745be4c35f8b1bfce0846644a401c6e16c33dd /drivers
parentdc491cdd2c81588ca6110f07325e32535192bcf0 (diff)
net/phy: micrel: configure intterupts after autoneg workaround
commit b866203d872d5deeafcecd25ea429d6748b5bd56 upstream. 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> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Reviewed-by: Florian Fainelli <f.fainelli@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/phy/micrel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index fab56c9350cf..222918828655 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -622,6 +622,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;