diff options
| author | Russell King (Oracle) <[email protected]> | 2023-09-14 15:36:02 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2023-09-17 13:31:23 +0000 |
| commit | adcbb85508c8bb181704154eec1dfe20554ddfe9 (patch) | |
| tree | fdf4160d57af28e9c7aa0ed1e460838bca907aa0 /drivers/net/phy/phy.c | |
| parent | net: phy: split locked and unlocked section of phy_state_machine() (diff) | |
| download | kernel-adcbb85508c8bb181704154eec1dfe20554ddfe9.tar.gz kernel-adcbb85508c8bb181704154eec1dfe20554ddfe9.zip | |
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.
Tested-by: Jijie Shao <[email protected]>
Signed-off-by: Russell King (Oracle) <[email protected]>
Reviewed-by: Florian Fainelli <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'drivers/net/phy/phy.c')
| -rw-r--r-- | drivers/net/phy/phy.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index d78c2cc003ce..93a8676dd8d8 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -1467,6 +1467,7 @@ void phy_state_machine(struct work_struct *work) void phy_stop(struct phy_device *phydev) { struct net_device *dev = phydev->attached_dev; + enum phy_state_work state_work; enum phy_state old_state; if (!phy_is_started(phydev) && phydev->state != PHY_DOWN && @@ -1490,9 +1491,10 @@ void phy_stop(struct phy_device *phydev) phydev->state = PHY_HALTED; phy_process_state_change(phydev, old_state); + state_work = _phy_state_machine(phydev); mutex_unlock(&phydev->lock); - phy_state_machine(&phydev->state_queue.work); + _phy_state_machine_post_work(phydev, state_work); phy_stop_machine(phydev); /* Cannot call flush_scheduled_work() here as desired because |
