aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHeiner Kallweit <hkallweit1@gmail.com>2018-07-19 02:15:16 -0400
committerDavid S. Miller <davem@davemloft.net>2018-07-21 19:20:38 -0400
commit215d08a85b9acf5e1fe9dbf50f1774cde333efef (patch)
tree134b54ef6258dde6510230c971c941db9457db45
parent1a03f867aaa19b454bef5c1697ae97d50e26ce30 (diff)
net: phy: consider PHY_IGNORE_INTERRUPT in phy_start_aneg_priv
The situation described in the comment can occur also with PHY_IGNORE_INTERRUPT, therefore change the condition to include it. Fixes: f555f34fdc58 ("net: phy: fix auto-negotiation stall due to unavailable interrupt") Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--drivers/net/phy/phy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 537297d2b4b4..6c9b24fe3148 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -514,7 +514,7 @@ static int phy_start_aneg_priv(struct phy_device *phydev, bool sync)
514 * negotiation may already be done and aneg interrupt may not be 514 * negotiation may already be done and aneg interrupt may not be
515 * generated. 515 * generated.
516 */ 516 */
517 if (phy_interrupt_is_valid(phydev) && (phydev->state == PHY_AN)) { 517 if (phydev->irq != PHY_POLL && phydev->state == PHY_AN) {
518 err = phy_aneg_done(phydev); 518 err = phy_aneg_done(phydev);
519 if (err > 0) { 519 if (err > 0) {
520 trigger = true; 520 trigger = true;