Skip to content

Commit

Permalink
net: phy: fix phy_start to consider PHY_IGNORE_INTERRUPT
Browse files Browse the repository at this point in the history
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: 84a527a ("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>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Feb 8, 2018
1 parent 88c991a commit 08f5138
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 08f5138

Please sign in to comment.