diff options
Diffstat (limited to 'drivers/usb/class/cdc-acm.h')
-rw-r--r-- | drivers/usb/class/cdc-acm.h | 24 |
1 files changed, 7 insertions, 17 deletions
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h index b4ea54dbf32..ca7937f26e2 100644 --- a/drivers/usb/class/cdc-acm.h +++ b/drivers/usb/class/cdc-acm.h | |||
@@ -72,16 +72,10 @@ struct acm_wb { | |||
72 | }; | 72 | }; |
73 | 73 | ||
74 | struct acm_rb { | 74 | struct acm_rb { |
75 | struct list_head list; | ||
76 | int size; | 75 | int size; |
77 | unsigned char *base; | 76 | unsigned char *base; |
78 | dma_addr_t dma; | 77 | dma_addr_t dma; |
79 | }; | 78 | int index; |
80 | |||
81 | struct acm_ru { | ||
82 | struct list_head list; | ||
83 | struct acm_rb *buffer; | ||
84 | struct urb *urb; | ||
85 | struct acm *instance; | 79 | struct acm *instance; |
86 | }; | 80 | }; |
87 | 81 | ||
@@ -97,35 +91,30 @@ struct acm { | |||
97 | unsigned int country_code_size; /* size of this buffer */ | 91 | unsigned int country_code_size; /* size of this buffer */ |
98 | unsigned int country_rel_date; /* release date of version */ | 92 | unsigned int country_rel_date; /* release date of version */ |
99 | struct acm_wb wb[ACM_NW]; | 93 | struct acm_wb wb[ACM_NW]; |
100 | struct acm_ru ru[ACM_NR]; | 94 | unsigned long read_urbs_free; |
101 | struct acm_rb rb[ACM_NR]; | 95 | struct urb *read_urbs[ACM_NR]; |
96 | struct acm_rb read_buffers[ACM_NR]; | ||
102 | int rx_buflimit; | 97 | int rx_buflimit; |
103 | int rx_endpoint; | 98 | int rx_endpoint; |
104 | spinlock_t read_lock; | 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 | int write_used; /* number of non-empty write buffers */ | 100 | int write_used; /* number of non-empty write buffers */ |
109 | int processing; | ||
110 | int transmitting; | 101 | int transmitting; |
111 | spinlock_t write_lock; | 102 | spinlock_t write_lock; |
112 | struct mutex mutex; | 103 | struct mutex mutex; |
113 | struct usb_cdc_line_coding line; /* bits, stop, parity */ | 104 | struct usb_cdc_line_coding line; /* bits, stop, parity */ |
114 | struct work_struct work; /* work queue entry for line discipline waking up */ | 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 | unsigned int ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */ | 106 | unsigned int ctrlin; /* input control lines (DCD, DSR, RI, break, overruns) */ |
119 | unsigned int ctrlout; /* output control lines (DTR, RTS) */ | 107 | unsigned int ctrlout; /* output control lines (DTR, RTS) */ |
120 | unsigned int writesize; /* max packet size for the output bulk endpoint */ | 108 | unsigned int writesize; /* max packet size for the output bulk endpoint */ |
121 | unsigned int readsize,ctrlsize; /* buffer sizes for freeing */ | 109 | unsigned int readsize,ctrlsize; /* buffer sizes for freeing */ |
122 | unsigned int minor; /* acm minor number */ | 110 | unsigned int minor; /* acm minor number */ |
123 | unsigned char throttle; /* throttled by tty layer */ | ||
124 | unsigned char clocal; /* termios CLOCAL */ | 111 | unsigned char clocal; /* termios CLOCAL */ |
125 | unsigned int ctrl_caps; /* control capabilities from the class specific header */ | 112 | unsigned int ctrl_caps; /* control capabilities from the class specific header */ |
126 | unsigned int susp_count; /* number of suspended interfaces */ | 113 | unsigned int susp_count; /* number of suspended interfaces */ |
127 | unsigned int combined_interfaces:1; /* control and data collapsed */ | 114 | unsigned int combined_interfaces:1; /* control and data collapsed */ |
128 | unsigned int is_int_ep:1; /* interrupt endpoints contrary to spec used */ | 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 */ | ||
129 | u8 bInterval; | 118 | u8 bInterval; |
130 | struct acm_wb *delayed_wb; /* write queued for a device about to be woken */ | 119 | struct acm_wb *delayed_wb; /* write queued for a device about to be woken */ |
131 | }; | 120 | }; |
@@ -137,3 +126,4 @@ struct acm { | |||
137 | #define SINGLE_RX_URB 2 | 126 | #define SINGLE_RX_URB 2 |
138 | #define NO_CAP_LINE 4 | 127 | #define NO_CAP_LINE 4 |
139 | #define NOT_A_MODEM 8 | 128 | #define NOT_A_MODEM 8 |
129 | #define NO_DATA_INTERFACE 16 | ||