net: phy: handle state correctly in phy_stop_machine
[pandora-kernel.git] / drivers / net / phy / phy.c
index 3cbda08..f3eb427 100644 (file)
@@ -453,7 +453,7 @@ void phy_stop_machine(struct phy_device *phydev)
        cancel_delayed_work_sync(&phydev->state_queue);
 
        mutex_lock(&phydev->lock);
-       if (phydev->state > PHY_UP)
+       if (phydev->state > PHY_UP && phydev->state != PHY_HALTED)
                phydev->state = PHY_UP;
        mutex_unlock(&phydev->lock);