Commit 088c64f8 authored by Johan Hovold's avatar Johan Hovold Committed by Greg Kroah-Hartman

USB: cdc-acm: re-write read processing

Kill rx tasklet, which is no longer needed, and re-write read processing.
Signed-off-by: default avatarJohan Hovold <jhovold@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 74f5e1ba
This diff is collapsed.
...@@ -72,16 +72,10 @@ struct acm_wb { ...@@ -72,16 +72,10 @@ struct acm_wb {
}; };
struct acm_rb { struct acm_rb {
struct list_head list;
int size; int size;
unsigned char *base; unsigned char *base;
dma_addr_t dma; dma_addr_t dma;
}; int index;
struct acm_ru {
struct list_head list;
struct acm_rb *buffer;
struct urb *urb;
struct acm *instance; struct acm *instance;
}; };
...@@ -97,34 +91,30 @@ struct acm { ...@@ -97,34 +91,30 @@ struct acm {
unsigned int country_code_size; /* size of this buffer */ unsigned int country_code_size; /* size of this buffer */
unsigned int country_rel_date; /* release date of version */ unsigned int country_rel_date; /* release date of version */
struct acm_wb wb[ACM_NW]; struct acm_wb wb[ACM_NW];
struct acm_ru ru[ACM_NR]; unsigned long read_urbs_free;
struct acm_rb rb[ACM_NR]; struct urb *read_urbs[ACM_NR];
struct acm_rb read_buffers[ACM_NR];
int rx_buflimit; int rx_buflimit;
int rx_endpoint; int rx_endpoint;
spinlock_t read_lock; 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 write_used; /* number of non-empty write buffers */
int processing;
int transmitting; int transmitting;
spinlock_t write_lock; spinlock_t write_lock;
struct mutex mutex; struct mutex mutex;
struct usb_cdc_line_coding line; /* bits, stop, parity */ struct usb_cdc_line_coding line; /* bits, stop, parity */
struct work_struct work; /* work queue entry for line discipline waking up */ 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 ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */
unsigned int ctrlout; /* output control lines (DTR, RTS) */ unsigned int ctrlout; /* output control lines (DTR, RTS) */
unsigned int writesize; /* max packet size for the output bulk endpoint */ unsigned int writesize; /* max packet size for the output bulk endpoint */
unsigned int readsize,ctrlsize; /* buffer sizes for freeing */ unsigned int readsize,ctrlsize; /* buffer sizes for freeing */
unsigned int minor; /* acm minor number */ unsigned int minor; /* acm minor number */
unsigned char throttle; /* throttled by tty layer */
unsigned char clocal; /* termios CLOCAL */ unsigned char clocal; /* termios CLOCAL */
unsigned int ctrl_caps; /* control capabilities from the class specific header */ unsigned int ctrl_caps; /* control capabilities from the class specific header */
unsigned int susp_count; /* number of suspended interfaces */ unsigned int susp_count; /* number of suspended interfaces */
unsigned int combined_interfaces:1; /* control and data collapsed */ unsigned int combined_interfaces:1; /* control and data collapsed */
unsigned int is_int_ep:1; /* interrupt endpoints contrary to spec used */ 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; u8 bInterval;
struct acm_wb *delayed_wb; /* write queued for a device about to be woken */ struct acm_wb *delayed_wb; /* write queued for a device about to be woken */
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment