lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 3 Dec 2009 15:25:48 +0100
From:	Oliver Neukum <oliver@...kum.org>
To:	Omar Laazimani <omar.oberthur@...il.com>, netdev@...r.kernel.org,
	linux-usb@...r.kernel.org
Subject: [patch]USB autosuspend for cdc-eem

Hi,

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

	Regards
		Oliver

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

--

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

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 netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ