aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-acm.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-05-23 15:33:02 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2011-05-23 15:33:02 -0400
commitc44dead70a841d90ddc01968012f323c33217c9e (patch)
tree85489ebe9b9a3413cd8ee197ffb40c8aa8d97e63 /drivers/usb/class/cdc-acm.h
parent99dff5856220a02b8711f2e8746413ea6e53ccf6 (diff)
parentd5f6db9e1aff6ccf1876224f152c0268b0c8a992 (diff)
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (205 commits) USB: EHCI: Remove SPARC_LEON {read,write}_be definitions from ehci.h USB: UHCI: Support big endian GRUSBHC HC sparc: add {read,write}*_be routines USB: UHCI: Add support for big endian descriptors USB: UHCI: Use ACCESS_ONCE rather than using a full compiler barrier USB: UHCI: Add support for big endian mmio usb-storage: Correct adjust_quirks to include latest flags usb/isp1760: Fix possible unlink problems usb/isp1760: Move function isp1760_endpoint_disable() within file. USB: remove remaining usages of hcd->state from usbcore and fix regression usb: musb: ux500: add configuration and build options for ux500 dma usb: musb: ux500: add dma glue layer for ux500 usb: musb: ux500: add dma name for ux500 usb: musb: ux500: add ux500 specific code for gadget side usb: musb: fix compile error usb-storage: fix up the unusual_realtek device list USB: gadget: f_audio: Fix invalid dereference of initdata EHCI: don't rescan interrupt QHs needlessly OHCI: fix regression caused by nVidia shutdown workaround USB: OTG: msm: Free VCCCX regulator even if we can't set the voltage ...
Diffstat (limited to 'drivers/usb/class/cdc-acm.h')
-rw-r--r--drivers/usb/class/cdc-acm.h24
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
74struct acm_rb { 74struct 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
81struct 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