Skip to content

Commit 520d564

Browse files
fschrempfgregkh
authored andcommitted
usbnet: smsc95xx: disable carrier check while suspending
[ Upstream commit 7b900ea ] 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 <frieder.schrempf@kontron.de> Reviewed-by: Raghuram Chary J <RaghuramChary.Jallipalli@microchip.com> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 36b0575 commit 520d564

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

‎drivers/net/usb/smsc95xx.c‎

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

1603+
cancel_delayed_work_sync(&pdata->carrier_check);
1604+
16031605
if (pdata->suspend_flags) {
16041606
netdev_warn(dev->net, "error during last resume\n");
16051607
pdata->suspend_flags = 0;
@@ -1842,6 +1844,11 @@ static int smsc95xx_suspend(struct usb_interface *intf, pm_message_t message)
18421844
*/
18431845
if (ret && PMSG_IS_AUTO(message))
18441846
usbnet_resume(intf);
1847+
1848+
if (ret)
1849+
schedule_delayed_work(&pdata->carrier_check,
1850+
CARRIER_CHECK_DELAY);
1851+
18451852
return ret;
18461853
}
18471854

0 commit comments

Comments
 (0)