diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 5f931912519ad937c27eba30990c5bd88816fd7d..dc9d03d8bb60c9f17ba8eda00c7cf81ba6706197 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1121,9 +1121,13 @@ void phy_state_machine(struct work_struct *work) /* Only re-schedule a PHY state machine change if we are polling the * PHY, if PHY_IGNORE_INTERRUPT is set, then we will be moving - * between states from phy_mac_interrupt() + * between states from phy_mac_interrupt(). + * + * In state PHY_HALTED the PHY gets suspended, so rescheduling the + * state machine would be pointless and possibly error prone when + * called from phy_disconnect() synchronously. */ - if (phy_polling_mode(phydev)) + if (phy_polling_mode(phydev) && old_state != PHY_HALTED) queue_delayed_work(system_power_efficient_wq, &phydev->state_queue, PHY_STATE_TIME * HZ); }