]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
net: phy: fix phy_start to consider PHY_IGNORE_INTERRUPT
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 8 Feb 2018 20:01:48 +0000 (21:01 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Feb 2018 20:35:51 +0000 (15:35 -0500)
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>
drivers/net/phy/phy.c

index f3313a12953121f958bd4f617203d1969ee7c27f..e3e29c2b028b58d84034a534d34427b243513460 100644 (file)
@@ -822,7 +822,7 @@ void phy_start(struct phy_device *phydev)
                phy_resume(phydev);
 
                /* make sure interrupts are re-enabled for the PHY */
-               if (phydev->irq != PHY_POLL) {
+               if (phy_interrupt_is_valid(phydev)) {
                        err = phy_enable_interrupts(phydev);
                        if (err < 0)
                                break;