Hi, this uses the generic framework of usbnet to implement USB autosuspend for cdc-eem. Comments? Regards Oliver Signed-off-by: Oliver Neukum <oliver@xxxxxxxxxx> -- commit 77893e39353314a8982c80a45ef117687789fb4c Author: Oliver Neukum <oliver@xxxxxxxxxx> Date: Thu Dec 3 14:11:17 2009 +0100 usb:cdc-eem: implement autosuspend implements aggressive autosuspend by using the generic methods of usbnet Signed-off-by: Oliver Neukum <oliver@xxxxxxxxxx> diff --git a/drivers/net/usb/cdc_eem.c b/drivers/net/usb/cdc_eem.c index 2330065..d6c16a9 100644 --- a/drivers/net/usb/cdc_eem.c +++ b/drivers/net/usb/cdc_eem.c @@ -335,10 +335,17 @@ next: return 1; } +static int eem_manage_power(struct usbnet *dev, int on) +{ + dev->intf->needs_remote_wakeup = on; + return 0; +} + static const struct driver_info eem_info = { .description = "CDC EEM Device", .flags = FLAG_ETHER, .bind = eem_bind, + .manage_power = eem_manage_power, .rx_fixup = eem_rx_fixup, .tx_fixup = eem_tx_fixup, }; @@ -364,6 +371,7 @@ static struct usb_driver eem_driver = { .disconnect = usbnet_disconnect, .suspend = usbnet_suspend, .resume = usbnet_resume, + .supports_autosuspend = 1, }; -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html