net: phy: micrel: fix interrupt handling
authorOleksij Rempel <o.rempel@pengutronix.de>
Fri, 27 Nov 2020 12:36:21 +0000 (13:36 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 28 Nov 2020 01:26:20 +0000 (17:26 -0800)
After migration to the shared interrupt support, the KSZ8031 PHY with
enabled interrupt support was not able to notify about link status
change.

Fixes: 59ca4e58b917 ("net: phy: micrel: implement generic .handle_interrupt() callback")
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://lore.kernel.org/r/20201127123621.31234-1-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/micrel.c

index 97f08f2..54e0d75 100644 (file)
@@ -207,7 +207,7 @@ static irqreturn_t kszphy_handle_interrupt(struct phy_device *phydev)
                return IRQ_NONE;
        }
 
-       if ((irq_status & KSZPHY_INTCS_STATUS))
+       if (!(irq_status & KSZPHY_INTCS_STATUS))
                return IRQ_NONE;
 
        phy_trigger_machine(phydev);