aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/usbnet.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/usb/usbnet.c')
-rw-r--r--drivers/net/usb/usbnet.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/usb/usbnet.c b/drivers/net/usb/usbnet.c
index fc9f578a1e25..f9819d10b1f9 100644
--- a/drivers/net/usb/usbnet.c
+++ b/drivers/net/usb/usbnet.c
@@ -1588,10 +1588,27 @@ int usbnet_resume (struct usb_interface *intf)
1588 tasklet_schedule (&dev->bh); 1588 tasklet_schedule (&dev->bh);
1589 } 1589 }
1590 } 1590 }
1591
1592 if (test_and_clear_bit(EVENT_DEVICE_REPORT_IDLE, &dev->flags))
1593 usb_autopm_get_interface_no_resume(intf);
1594
1591 return 0; 1595 return 0;
1592} 1596}
1593EXPORT_SYMBOL_GPL(usbnet_resume); 1597EXPORT_SYMBOL_GPL(usbnet_resume);
1594 1598
1599/*
1600 * Either a subdriver implements manage_power, then it is assumed to always
1601 * be ready to be suspended or it reports the readiness to be suspended
1602 * explicitly
1603 */
1604void usbnet_device_suggests_idle(struct usbnet *dev)
1605{
1606 if (!test_and_set_bit(EVENT_DEVICE_REPORT_IDLE, &dev->flags)) {
1607 dev->intf->needs_remote_wakeup = 1;
1608 usb_autopm_put_interface_async(dev->intf);
1609 }
1610}
1611EXPORT_SYMBOL(usbnet_device_suggests_idle);
1595 1612
1596/*-------------------------------------------------------------------------*/ 1613/*-------------------------------------------------------------------------*/
1597 1614