diff options
author | Oliver Neukum <oliver@neukum.org> | 2008-06-20 11:25:57 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-07-21 15:16:36 -0700 |
commit | 11ea859d64b69a747d6b060b9ed1520eab1161fe (patch) | |
tree | 3b2de5ad788d145101762876e12c78c5b6383f93 /drivers/usb/class/cdc-acm.h | |
parent | 188d63602756bfd4aa1fb61d531dbd59bddac962 (diff) | |
download | blackbird-op-linux-11ea859d64b69a747d6b060b9ed1520eab1161fe.tar.gz blackbird-op-linux-11ea859d64b69a747d6b060b9ed1520eab1161fe.zip |
USB: additional power savings for cdc-acm devices that support remote wakeup
this patch saves power for cdc-acm devices that support remote wakeup
while the device is connected.
- request needs_remote_wakeup when needed
- delayed write while a device is autoresumed
- the device is marked busy when appropriate
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class/cdc-acm.h')
-rw-r--r-- | drivers/usb/class/cdc-acm.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h index 046e064b033a..85c3aaaab7c5 100644 --- a/drivers/usb/class/cdc-acm.h +++ b/drivers/usb/class/cdc-acm.h @@ -107,10 +107,14 @@ struct acm { struct list_head filled_read_bufs; int write_used; /* number of non-empty write buffers */ int write_ready; /* write urb is not running */ + int old_ready; + int processing; + int transmitting; spinlock_t write_lock; struct mutex mutex; struct usb_cdc_line_coding line; /* bits, stop, parity */ struct work_struct work; /* work queue entry for line discipline waking up */ + struct work_struct waker; struct tasklet_struct urb_task; /* rx processing */ spinlock_t throttle_lock; /* synchronize throtteling and read callback */ unsigned int ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */ @@ -123,6 +127,7 @@ struct acm { unsigned char clocal; /* termios CLOCAL */ unsigned int ctrl_caps; /* control capabilities from the class specific header */ unsigned int susp_count; /* number of suspended interfaces */ + struct acm_wb *delayed_wb; /* write queued for a device about to be woken */ }; #define CDC_DATA_INTERFACE_TYPE 0x0a |