Convert phy_stop() to use the new locked-section and unlocked-section parts of the PHY state machine.
Unified · Split
| @@ -1467,6 +1467,7 @@ void phy_state_machine(struct work_struct *work) · 1466 unmodified lines | ||
| 1467 | 1467 | void phy_stop(struct phy_device *phydev) |
| 1468 | 1468 | { |
| 1469 | 1469 | struct net_device *dev = phydev->attached_dev; |
| 1470 | + enum phy_state_work state_work; | |
| 1470 | 1471 | enum phy_state old_state; |
| 1471 | 1472 | |
| 1472 | 1473 | if (!phy_is_started(phydev) && phydev->state != PHY_DOWN && |
| @@ -1490,9 +1491,10 @@ void phy_stop(struct phy_device *phydev) · 17 unmodified lines | ||
| 1490 | 1491 | phydev->state = PHY_HALTED; |
| 1491 | 1492 | phy_process_state_change(phydev, old_state); |
| 1492 | 1493 | |
| 1494 | + state_work = _phy_state_machine(phydev); | |
| 1493 | 1495 | mutex_unlock(&phydev->lock); |
| 1494 | 1496 | |
| 1495 | − phy_state_machine(&phydev->state_queue.work); | |
| 1497 | + _phy_state_machine_post_work(phydev, state_work); | |
| 1496 | 1498 | phy_stop_machine(phydev); |
| 1497 | 1499 | |
| 1498 | 1500 | /* Cannot call flush_scheduled_work() here as desired because |