From: Zach Brown Date: Tue, 20 Jun 2017 17:48:11 +0000 (-0500) Subject: net/phy: micrel: configure intterupts after autoneg workaround X-Git-Tag: v4.11.12~88 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5dc86c8d7849aee36159bd24163911fac6ff849e;p=thirdparty%2Fkernel%2Fstable.git net/phy: micrel: configure intterupts after autoneg workaround [ Upstream commit b866203d872d5deeafcecd25ea429d6748b5bd56 ] 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 Reviewed-by: Andrew Lunn Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index da5b392683703..4b7a6e0d4c39f 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -611,6 +611,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;