Skip to contentSkip to conversation

USB autosuspend for cdc-eem

PATCH In review Oliver Neukum 2 participants 2 messages Dec 3, 2009 1 message not in the archive

Subsystems (4)
lore
Share & tools
lore

Oliver Neukum

author maintainer
#0 lore raw

PATCH 1/1 USB autosuspend for cdc-eem

Hi,

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

Regards
Oliver

--

commit 77893e39353314a8982c80a45ef117687789fb4c

Author: Oliver Neukum <[email protected]>
Date:   Thu Dec 3 14:11:17 2009 +0100

usb:cdc-eem: implement autosuspend

implements aggressive autosuspend by using the generic methods of usbnet

drivers/net/usb/cdc_eem.c +8 -0
index 2330065..d6c16a9 100644
@@ -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,
 };
 
 

A message that is not in the archive (sent off-list or not yet received): 200912031525.49001.oliver-GvhC2dPhHPQdnm+yROfE0A@public.gmane.org

#2 lore raw

From: Oliver Neukum <[email protected]>
Date: Thu, 3 Dec 2009 15:25:48 +0100

Quoted 2 lines

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 linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html