History

net: phy: convert phy_stop() to use split state machine

Convert phy_stop() to use the new locked-section and unlocked-section parts of the PHY state machine.

Russell King (Oracle) committed 3 years ago

Commit adcbb851 parent 8635c061 file · +3 −1Browse files

Unified · Split

drivers/net/phy/phy.c+3−1
@@ -1467,6 +1467,7 @@ void phy_state_machine(struct work_struct *work) · 1466 unmodified lines
1467void phy_stop(struct phy_device *phydev)1467void phy_stop(struct phy_device *phydev)
1468{1468{
1469 struct net_device *dev = phydev->attached_dev;1469 struct net_device *dev = phydev->attached_dev;
1470 enum phy_state_work state_work;
1470 enum phy_state old_state;1471 enum phy_state old_state;
1471 1472
1472 if (!phy_is_started(phydev) && phydev->state != PHY_DOWN &&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 phydev->state = PHY_HALTED;1491 phydev->state = PHY_HALTED;
1491 phy_process_state_change(phydev, old_state);1492 phy_process_state_change(phydev, old_state);
1492 1493
1494 state_work = _phy_state_machine(phydev);
1493 mutex_unlock(&phydev->lock);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 phy_stop_machine(phydev);1498 phy_stop_machine(phydev);
1497 1499
1498 /* Cannot call flush_scheduled_work() here as desired because1500 /* Cannot call flush_scheduled_work() here as desired because

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t