浏览代码

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>
Heiner Kallweit 7 年之前
父节点
当前提交
215d08a85b
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/phy/phy.c

+ 1 - 1
drivers/net/phy/phy.c

@@ -514,7 +514,7 @@ static int phy_start_aneg_priv(struct phy_device *phydev, bool sync)
 	 * negotiation may already be done and aneg interrupt may not be
 	 * negotiation may already be done and aneg interrupt may not be
 	 * generated.
 	 * generated.
 	 */
 	 */
-	if (phy_interrupt_is_valid(phydev) && (phydev->state == PHY_AN)) {
+	if (phydev->irq != PHY_POLL && phydev->state == PHY_AN) {
 		err = phy_aneg_done(phydev);
 		err = phy_aneg_done(phydev);
 		if (err > 0) {
 		if (err > 0) {
 			trigger = true;
 			trigger = true;