]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/usb/class/cdc-acm.h
USB: use get_unaligned_* helpers for kl5kusb105 driver
[linux-2.6-omap-h63xx.git] / drivers / usb / class / cdc-acm.h
index 1bcaea32cfc19dc70550a70a8c365c4af2d29c38..046e064b033af6675bb48208b277f9967130c243 100644 (file)
@@ -59,7 +59,7 @@
  * when processing onlcr, so we only need 2 buffers. These values must be
  * powers of 2.
  */
-#define ACM_NW  2
+#define ACM_NW  16
 #define ACM_NR  16
 
 struct acm_wb {
@@ -67,6 +67,8 @@ struct acm_wb {
        dma_addr_t dmah;
        int len;
        int use;
+       struct urb              *urb;
+       struct acm              *instance;
 };
 
 struct acm_rb {
@@ -88,9 +90,12 @@ struct acm {
        struct usb_interface *control;                  /* control interface */
        struct usb_interface *data;                     /* data interface */
        struct tty_struct *tty;                         /* the corresponding tty */
-       struct urb *ctrlurb, *writeurb;                 /* urbs */
+       struct urb *ctrlurb;                    /* urbs */
        u8 *ctrl_buffer;                                /* buffers of urbs */
        dma_addr_t ctrl_dma;                            /* dma handles of buffers */
+       u8 *country_codes;                              /* country codes from device */
+       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];
@@ -100,10 +105,10 @@ struct acm {
        struct list_head spare_read_urbs;
        struct list_head spare_read_bufs;
        struct list_head filled_read_bufs;
-       int write_current;                              /* current write buffer */
        int write_used;                                 /* number of non-empty write buffers */
        int write_ready;                                /* write urb is not running */
        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 */
@@ -117,6 +122,7 @@ struct acm {
        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 */
 };
 
 #define CDC_DATA_INTERFACE_TYPE        0x0a