[PATCH v1] net: phy: micrel: fix interrupt handling

From: Oleksij Rempel
Date: Fri Nov 27 2020 - 07:36:32 EST


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@xxxxxxxxxxxxxx>
---
drivers/net/phy/micrel.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c
index 97f08f20630b..54e0d75203da 100644
--- a/drivers/net/phy/micrel.c
+++ b/drivers/net/phy/micrel.c
@@ -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);
--
2.29.2