============================cut here===============================
The phy_state_machine was still running and didn't know whether the phydev's driver was
removed or not, then occur this problem, so we need to stop the phy_state_machine when
removing the phy driver.
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
---
drivers/net/phy/phy_device.c | 2 ++
1 file changed, 2 insertions(+)
@@ -1282,6 +1282,8 @@ static int phy_remove(struct device *dev)
{
struct phy_device *phydev = to_phy_device(dev);
+ phy_stop_machine(phydev);
+
mutex_lock(&phydev->lock);
phydev->state = PHY_DOWN;
mutex_unlock(&phydev->lock);