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>
This commit is contained in:
committed by
David S. Miller
parent
7f51579027
commit
69ee472f27
@@ -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)
|
||||
@@ -109,6 +112,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 *);
|
||||
|
||||
|
Reference in New Issue
Block a user