diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2018-09-18 21:56:32 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-09-19 21:06:46 -0700 |
commit | e8cfd9d6c7727a067b38dbe7655ca02377fdb301 (patch) | |
tree | c92c9238c4f860eb6b7d2e44ee44023f47255222 /drivers/net/phy/phy.c | |
parent | 124eee3f6955f7aa19b9e6ff5c9b6d37cb3d1e2c (diff) | |
download | lwn-e8cfd9d6c7727a067b38dbe7655ca02377fdb301.tar.gz lwn-e8cfd9d6c7727a067b38dbe7655ca02377fdb301.zip |
net: phy: call state machine synchronously in phy_stop
phy_stop() may be called e.g. when suspending, therefore all needed
actions should be performed synchronously. Therefore add a synchronous
call to the state machine.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 1ee25877c4d1..a5e0f0721035 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -861,6 +861,8 @@ void phy_stop(struct phy_device *phydev) out_unlock: mutex_unlock(&phydev->lock); + phy_state_machine(&phydev->state_queue.work); + /* Cannot call flush_scheduled_work() here as desired because * of rtnl_lock(), but PHY_HALTED shall guarantee phy_change() * will not reenable interrupts. |