aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/class/cdc-acm.h
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2011-03-25 11:06:02 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-13 16:18:34 -0700
commit088c64f812847b3623b03d167ed329f90f3e38a4 (patch)
tree2c76790cf12fddf227b4ab21d43002713837c948 /drivers/usb/class/cdc-acm.h
parent74f5e1babde76149c2bb35ca5dbf4d0b9b38f161 (diff)
USB: cdc-acm: re-write read processing
Kill rx tasklet, which is no longer needed, and re-write read processing. Signed-off-by: Johan Hovold <jhovold@gmail.com> 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.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
index 7282d1f4912..7b5c0bd07f8 100644
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -72,16 +72,10 @@ struct acm_wb {
};
struct acm_rb {
- struct list_head list;
int size;
unsigned char *base;
dma_addr_t dma;
-};
-
-struct acm_ru {
- struct list_head list;
- struct acm_rb *buffer;
- struct urb *urb;
+ int index;
struct acm *instance;
};
@@ -97,34 +91,30 @@ struct acm {
unsigned int country_code_size; /* size of this buffer */
unsigned int country_rel_date; /* release date of version */
struct acm_wb wb[ACM_NW];
- struct acm_ru ru[ACM_NR];
- struct acm_rb rb[ACM_NR];
+ unsigned long read_urbs_free;
+ struct urb *read_urbs[ACM_NR];
+ struct acm_rb read_buffers[ACM_NR];
int rx_buflimit;
int rx_endpoint;
spinlock_t read_lock;
- struct list_head spare_read_urbs;
- struct list_head spare_read_bufs;
- struct list_head filled_read_bufs;
int write_used; /* number of non-empty write buffers */
- 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 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) */
unsigned int ctrlout; /* output control lines (DTR, RTS) */
unsigned int writesize; /* max packet size for the output bulk endpoint */
unsigned int readsize,ctrlsize; /* buffer sizes for freeing */
unsigned int minor; /* acm minor number */
- unsigned char throttle; /* throttled by tty layer */
unsigned char clocal; /* termios CLOCAL */
unsigned int ctrl_caps; /* control capabilities from the class specific header */
unsigned int susp_count; /* number of suspended interfaces */
unsigned int combined_interfaces:1; /* control and data collapsed */
unsigned int is_int_ep:1; /* interrupt endpoints contrary to spec used */
+ unsigned int throttled:1; /* actually throttled */
+ unsigned int throttle_req:1; /* throttle requested */
u8 bInterval;
struct acm_wb *delayed_wb; /* write queued for a device about to be woken */
};