diff mbox

USB autosuspend for cdc-eem

Message ID 200912031525.49001.oliver@neukum.org
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Oliver Neukum Dec. 3, 2009, 2:25 p.m. UTC
Hi,

this uses the generic framework of usbnet to implement USB autosuspend
for cdc-eem. Comments?

	Regards
		Oliver

Signed-off-by: Oliver Neukum <oliver@neukum.org>

--

commit 77893e39353314a8982c80a45ef117687789fb4c
Author: Oliver Neukum <oliver@neukum.org>
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@neukum.org>

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

David Miller Dec. 3, 2009, 8:32 p.m. UTC | #1
From: Oliver Neukum <oliver@neukum.org>
Date: Thu, 3 Dec 2009 15:25:48 +0100

> this uses the generic framework of usbnet to implement USB autosuspend
> for cdc-eem. Comments?

Please compose this patch posting properly as I described in my
previous email to you.

Thanks.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

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,
 };