diff options
author | Oliver Neukum <oliver@neukum.org> | 2009-12-03 18:31:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-12-03 18:31:18 -0500 |
commit | 69ee472f2706371ca639de49b06df91615c07d8d (patch) | |
tree | 3f6de524e96679a2e54b55bb0ba9d1fd71c8222c /include/linux/usb/usbnet.h | |
parent | 7f515790274d26d710303b7a1f23571ca93a6288 (diff) |
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.
Signed-off-by: Oliver Neukum <oliver@neukum.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/usb/usbnet.h')
-rw-r--r-- | include/linux/usb/usbnet.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index 8c84881f8478..8ce61359bf73 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -55,6 +55,7 @@ struct usbnet { | |||
55 | struct sk_buff_head done; | 55 | struct sk_buff_head done; |
56 | struct sk_buff_head rxq_pause; | 56 | struct sk_buff_head rxq_pause; |
57 | struct urb *interrupt; | 57 | struct urb *interrupt; |
58 | struct usb_anchor deferred; | ||
58 | struct tasklet_struct bh; | 59 | struct tasklet_struct bh; |
59 | 60 | ||
60 | struct work_struct kevent; | 61 | struct work_struct kevent; |
@@ -65,6 +66,8 @@ struct usbnet { | |||
65 | # define EVENT_STS_SPLIT 3 | 66 | # define EVENT_STS_SPLIT 3 |
66 | # define EVENT_LINK_RESET 4 | 67 | # define EVENT_LINK_RESET 4 |
67 | # define EVENT_RX_PAUSED 5 | 68 | # define EVENT_RX_PAUSED 5 |
69 | # define EVENT_DEV_WAKING 6 | ||
70 | # define EVENT_DEV_ASLEEP 7 | ||
68 | }; | 71 | }; |
69 | 72 | ||
70 | static inline struct usb_driver *driver_of(struct usb_interface *intf) | 73 | static inline struct usb_driver *driver_of(struct usb_interface *intf) |
@@ -109,6 +112,9 @@ struct driver_info { | |||
109 | /* see if peer is connected ... can sleep */ | 112 | /* see if peer is connected ... can sleep */ |
110 | int (*check_connect)(struct usbnet *); | 113 | int (*check_connect)(struct usbnet *); |
111 | 114 | ||
115 | /* (dis)activate runtime power management */ | ||
116 | int (*manage_power)(struct usbnet *, int); | ||
117 | |||
112 | /* for status polling */ | 118 | /* for status polling */ |
113 | void (*status)(struct usbnet *, struct urb *); | 119 | void (*status)(struct usbnet *, struct urb *); |
114 | 120 | ||