提交 7b900ead 编写于 作者: F Frieder Schrempf 提交者: David S. Miller

usbnet: smsc95xx: disable carrier check while suspending

We need to make sure, that the carrier check polling is disabled
while suspending. Otherwise we can end up with usbnet_read_cmd()
being issued when only usbnet_read_cmd_nopm() is allowed. If this
happens, read operations lock up.

Fixes: d69d1694 ("usbnet: smsc95xx: fix link detection for disabled autonegotiation")
Signed-off-by: NFrieder Schrempf <frieder.schrempf@kontron.de>
Reviewed-by: NRaghuram Chary J <RaghuramChary.Jallipalli@microchip.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 49682bfa
......@@ -1598,6 +1598,8 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
return ret;
}
cancel_delayed_work_sync(&pdata->carrier_check);
if (pdata->suspend_flags) {
netdev_warn(dev->net, "error during last resume\n");
pdata->suspend_flags = 0;
......@@ -1840,6 +1842,11 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
*/
if (ret && PMSG_IS_AUTO(message))
usbnet_resume(intf);
if (ret)
schedule_delayed_work(&pdata->carrier_check,
CARRIER_CHECK_DELAY);
return ret;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册