Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: fix phy_start to consider PHY_IGNORE_INTERRUPT

This condition wasn't adjusted when PHY_IGNORE_INTERRUPT (-2) was added
long ago. In case of PHY_IGNORE_INTERRUPT the MAC interrupt indicates
also PHY state changes and we should do what the symbol says.

Fixes: 84a527a41f38 ("net: phylib: fix interrupts re-enablement in phy_start")
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Heiner Kallweit and committed by
David S. Miller
08f51385 88c991a9

+1 -1
+1 -1
drivers/net/phy/phy.c
··· 822 822 phy_resume(phydev); 823 823 824 824 /* make sure interrupts are re-enabled for the PHY */ 825 - if (phydev->irq != PHY_POLL) { 825 + if (phy_interrupt_is_valid(phydev)) { 826 826 err = phy_enable_interrupts(phydev); 827 827 if (err < 0) 828 828 break;