55
* The only reason to have several buffers is to accomodate assumptions
55
* The only reason to have several buffers is to accommodate assumptions
56
56
* in line disciplines. They ask for empty space amount, receive our URB size,
57
57
* and proceed to issue several 1-character writes, assuming they will fit.
58
58
* The very first write takes a complete URB. Fortunately, this only happens
97
91
unsigned int country_code_size; /* size of this buffer */
98
92
unsigned int country_rel_date; /* release date of version */
99
93
struct acm_wb wb[ACM_NW];
100
struct acm_ru ru[ACM_NR];
101
struct acm_rb rb[ACM_NR];
94
unsigned long read_urbs_free;
95
struct urb *read_urbs[ACM_NR];
96
struct acm_rb read_buffers[ACM_NR];
104
99
spinlock_t read_lock;
105
struct list_head spare_read_urbs;
106
struct list_head spare_read_bufs;
107
struct list_head filled_read_bufs;
108
100
int write_used; /* number of non-empty write buffers */
110
101
int transmitting;
111
102
spinlock_t write_lock;
112
103
struct mutex mutex;
113
104
struct usb_cdc_line_coding line; /* bits, stop, parity */
114
105
struct work_struct work; /* work queue entry for line discipline waking up */
115
wait_queue_head_t drain_wait; /* close processing */
116
struct tasklet_struct urb_task; /* rx processing */
117
spinlock_t throttle_lock; /* synchronize throtteling and read callback */
118
106
unsigned int ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */
119
107
unsigned int ctrlout; /* output control lines (DTR, RTS) */
120
108
unsigned int writesize; /* max packet size for the output bulk endpoint */
121
109
unsigned int readsize,ctrlsize; /* buffer sizes for freeing */
122
110
unsigned int minor; /* acm minor number */
123
unsigned char throttle; /* throttled by tty layer */
124
111
unsigned char clocal; /* termios CLOCAL */
125
112
unsigned int ctrl_caps; /* control capabilities from the class specific header */
126
113
unsigned int susp_count; /* number of suspended interfaces */
127
114
unsigned int combined_interfaces:1; /* control and data collapsed */
128
115
unsigned int is_int_ep:1; /* interrupt endpoints contrary to spec used */
116
unsigned int throttled:1; /* actually throttled */
117
unsigned int throttle_req:1; /* throttle requested */
130
119
struct acm_wb *delayed_wb; /* write queued for a device about to be woken */