usb: renesas_usbhs: shrink spin lock area
[pandora-kernel.git] / drivers / usb / class / cdc-acm.h
index b4ea54d..ca7937f 100644 (file)
@@ -72,16 +72,10 @@ struct acm_wb {
 };
 
 struct acm_rb {
-       struct list_head        list;
        int                     size;
        unsigned char           *base;
        dma_addr_t              dma;
-};
-
-struct acm_ru {
-       struct list_head        list;
-       struct acm_rb           *buffer;
-       struct urb              *urb;
+       int                     index;
        struct acm              *instance;
 };
 
@@ -97,35 +91,30 @@ struct acm {
        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];
+       unsigned long read_urbs_free;
+       struct urb *read_urbs[ACM_NR];
+       struct acm_rb read_buffers[ACM_NR];
        int rx_buflimit;
        int rx_endpoint;
        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 processing;
        int transmitting;
        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 */
-       wait_queue_head_t drain_wait;                   /* close processing */
-       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 ctrlout;                           /* output control lines (DTR, RTS) */
        unsigned int writesize;                         /* max packet size for the output bulk endpoint */
        unsigned int readsize,ctrlsize;                 /* buffer sizes for freeing */
        unsigned int minor;                             /* acm minor number */
-       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 */
        unsigned int combined_interfaces:1;             /* control and data collapsed */
        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;
        struct acm_wb *delayed_wb;                      /* write queued for a device about to be woken */
 };
@@ -137,3 +126,4 @@ struct acm {
 #define SINGLE_RX_URB                  2
 #define NO_CAP_LINE                    4
 #define NOT_A_MODEM                    8
+#define NO_DATA_INTERFACE              16