提交 2f554490 编写于 作者: H Heiner Kallweit 提交者: Yang Yingliang

net: phy: call state machine synchronously in phy_stop

mainline inclusion
from mainline-v4.20-rc1
commit e8cfd9d6
category: bugfix
bugzilla: NA
CVE: NA

----------------------------------------------------

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: NHeiner Kallweit <hkallweit1@gmail.com>
Tested-by: NGeert Uytterhoeven <geert+renesas@glider.be>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Reviewed-by: NWeiwei Deng <dengweiwei@huawei.com>
Reviewed-by: NZhaohui Zhong <zhongzhaohui@huawei.com>
Reviewed-by: NYonglong Liu <liuyonglong@huawei.com>
Signed-off-by: NYou Shengzui <youshengzui@huawei.com>
Reviewed-by: NYueHaibing <yuehaibing@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 2e094fe9
...@@ -861,6 +861,8 @@ void phy_stop(struct phy_device *phydev) ...@@ -861,6 +861,8 @@ void phy_stop(struct phy_device *phydev)
out_unlock: out_unlock:
mutex_unlock(&phydev->lock); mutex_unlock(&phydev->lock);
phy_state_machine(&phydev->state_queue.work);
/* Cannot call flush_scheduled_work() here as desired because /* Cannot call flush_scheduled_work() here as desired because
* of rtnl_lock(), but PHY_HALTED shall guarantee phy_change() * of rtnl_lock(), but PHY_HALTED shall guarantee phy_change()
* will not reenable interrupts. * will not reenable interrupts.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册