usbnet & cdc-ether: Autosuspend for online devices
Subsystems (6)
Oliver Neukum
maintainerPATCH 2/2 usbnet & cdc-ether: Autosuspend for online devices
Quoted 1 line
From
17b97d1c24a061843a8f707e80f23a7b0b7647dfMon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
Date: Thu, 3 Dec 2009 22:08:12 +0100
Subject: [PATCH 2/2] usbnet & cdc-ether: Autosuspend for online devices
Using remote wakeup and delayed transmission to allow online device to go into usb autosuspend. Minimal alternate support for devices that don't support remote wakeup.
--- drivers/net/usb/cdc_ether.c | 8 ++ drivers/net/usb/usbnet.c | 155 +++++++++++++++++++++++++++++++++++-------- include/linux/usb/usbnet.h | 6 ++ 3 files changed, 140 insertions(+), 29 deletions(-)
drivers/net/usb/cdc_ether.c +8 -0
@@ -411,6 +411,12 @@ static int cdc_bind(struct usbnet *dev, struct usb_interface *intf)return 0 ; } +static int cdc_manage_power (struct usbnet *dev,int on) +{ + dev->intf->needs_remote_wakeup = on; +return 0 ; +} +static const struct driver_info cdc_info = { .description ="CDC Ethernet Device" , .flags =FLAG_ETHER ,
@@ -418,6 +424,7 @@ static const struct driver_info cdc_info = { .bind = cdc_bind, .unbind = usbnet_cdc_unbind, .status = cdc_status, + .manage_power = cdc_manage_power, };/*-------------------------------------------------------------------------*/
@@ -611,6 +618,7 @@ static struct usb_driver cdc_driver = { .suspend = usbnet_suspend, .resume = usbnet_resume, .reset_resume = usbnet_resume, + .supports_autosuspend = 1, };
drivers/net/usb/usbnet.c +126 -29
287 lines not on this page · raw message
include/linux/usb/usbnet.h +6 -0
@@ -55,6 +55,7 @@ struct usbnet {struct sk_buff_head done;struct sk_buff_head rxq_pause;struct urb *interrupt; +struct usb_anchor deferred;struct tasklet_struct bh;struct work_struct kevent;
@@ -65,6 +66,8 @@ struct usbnet {# define EVENT_STS_SPLIT 3# define EVENT_LINK_RESET 4# define EVENT_RX_PAUSED 5 +# define EVENT_DEV_WAKING 6 +# define EVENT_DEV_ASLEEP 7 };static inline struct usb_driver *driver_of (struct usb_interface *intf)
@@ -107,6 +110,9 @@ struct driver_info {/* see if peer is connected ... can sleep */ int (*check_connect)(struct usbnet *); +/* (dis)activate runtime power management */ +int (*manage_power)(struct usbnet *,int ); +/* for status polling */ void (*status)(struct usbnet *,struct urb *);
Signature · 1 line
1.6.4.2
David Miller
maintainerFrom: Oliver Neukum <[email protected]>
Date: Thu, 3 Dec 2009 22:41:43 +0100
Quoted 11 lines
From
17b97d1c24a061843a8f707e80f23a7b0b7647dfMon Sep 17 00:00:00 2001
From: Oliver Neukum <[email protected]>
Date: Thu, 3 Dec 2009 22:08:12 +0100
Subject: [PATCH 2/2] usbnet & cdc-ether: Autosuspend for online devicesUsing remote wakeup and delayed transmission to allow online device to go into usb autosuspend. Minimal alternate support for devices that don't support remote wakeup.
Signed-off-by Oliver Neukum <[email protected]>
Same problem:
davem@sunset:~/src/GIT/net-next-2.6$ git am --signoff bundle-737.mbox Applying: cdc-ether:Implement reset_resume() Applying: usbnet & cdc-ether: Autosuspend for online devices error: patch failed: drivers/net/usb/cdc_ether.c:411 error: drivers/net/usb/cdc_ether.c: patch does not apply error: patch failed: drivers/net/usb/usbnet.c:353 error: drivers/net/usb/usbnet.c: patch does not apply Patch failed at 0002 usbnet & cdc-ether: Autosuspend for online devices When you have resolved this problem run "git am --resolved". If you would prefer to skip this patch, instead run "git am --skip". To restore the original branch and stop patching run "git am --abort". davem@sunset:~/src/GIT/net-next-2.6$
But this all might be due to some other changes I applied today and didn't push out yet to net-next-2.6, let me check on that for you.
Oliver Neukum
maintainerAm Donnerstag, 3. Dezember 2009 22:45:32 schrieb David Miller:
Quoted 2 lines
But this all might be due to some other changes I applied today and didn't push out yet to net-next-2.6, let me check on that for you.
This is the top of my tree.
Regards
Oliver
commit 17b97d1c24a061843a8f707e80f23a7b0b7647df
Author: Oliver Neukum <[email protected]> Date: Thu Dec 3 22:08:12 2009 +0100
usbnet & cdc-ether: Autosuspend for online devices
Using remote wakeup and delayed transmission to allow online device to go into usb autosuspend. Minimal alternate support for devices that don't support remote wakeup.
commit b215603d7bbe3907666d27ebcd6ae847dd4f3a03
Author: Oliver Neukum <[email protected]> Date: Thu Dec 3 22:02:11 2009 +0100
cdc-ether:Implement reset_resume()
Normal resume can do double duty as reset_resume() for this driver as it keeps no state in the device
commit 1f5865e73fb18834f52bd6e1d27bce86ff372089
Author: Shan Wei <[email protected]> Date: Wed Dec 2 15:39:04 2009 -0800
ip: update the description of rp_filter in ip-sysctl.txt
The commit 27fed4175acf81ddd91d9a4ee2fd298981f60295 (ip: fix logic of reverse path filter sysctl) has changed the logic of rp_filter. The document about rp_filter is out of date. Now, setting conf/all/rp_filte with 0 can also enable source validation.
Update the document according to the commit.
David Miller
maintainerFrom: David Miller <[email protected]>
Date: Thu, 03 Dec 2009 13:45:32 -0800 (PST)
Quoted 2 lines
But this all might be due to some other changes I applied today and didn't push out yet to net-next-2.6, let me check on that for you.
I've resolved this, it was a conflict with Joe Perches's drivers/net coding style cleanups that went in today.
Oliver Neukum
maintainerAm Freitag, 4. Dezember 2009 00:27:21 schrieb David Miller:
Quoted 8 lines
From: David Miller <[email protected]>
Date: Thu, 03 Dec 2009 13:45:32 -0800 (PST)Quoted 2 lines
But this all might be due to some other changes I applied today and didn't push out yet to net-next-2.6, let me check on that for you.
I've resolved this, it was a conflict with Joe Perches's
drivers/netcoding style cleanups that went in today.
OK, so you don't need me to respin on a newer tree? I was doubting my own sanity.
Regards
Oliver
David Miller
maintainerFrom: Oliver Neukum <[email protected]>
Date: Fri, 4 Dec 2009 09:14:18 +0100
Quoted 11 lines
Am Freitag, 4. Dezember 2009 00:27:21 schrieb David Miller:
Quoted 8 lines
From: David Miller <[email protected]>
Date: Thu, 03 Dec 2009 13:45:32 -0800 (PST)Quoted 2 lines
But this all might be due to some other changes I applied today and didn't push out yet to net-next-2.6, let me check on that for you.
I've resolved this, it was a conflict with Joe Perches's
drivers/netcoding style cleanups that went in today.OK, so you don't need me to respin on a newer tree?
Nope.
Quoted 1 line
I was doubting my own sanity.
:-)