Skip to content

Commit 7b900ea

Browse files
fschrempfdavem330
authored andcommitted
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: d69d169 ("usbnet: smsc95xx: fix link detection for disabled autonegotiation") Signed-off-by: Frieder Schrempf <[email protected]> Reviewed-by: Raghuram Chary J <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 49682bf commit 7b900ea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

drivers/net/usb/smsc95xx.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1598,6 +1598,8 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
15981598
return ret;
15991599
}
16001600

1601+
cancel_delayed_work_sync(&pdata->carrier_check);
1602+
16011603
if (pdata->suspend_flags) {
16021604
netdev_warn(dev->net, "error during last resume\n");
16031605
pdata->suspend_flags = 0;
@@ -1840,6 +1842,11 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
18401842
*/
18411843
if (ret && PMSG_IS_AUTO(message))
18421844
usbnet_resume(intf);
1845+
1846+
if (ret)
1847+
schedule_delayed_work(&pdata->carrier_check,
1848+
CARRIER_CHECK_DELAY);
1849+
18431850
return ret;
18441851
}
18451852

0 commit comments

Comments
 (0)