X-Git-Url: http://pilppa.org/gitweb/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fclass%2Fcdc-acm.h;h=046e064b033af6675bb48208b277f9967130c243;hb=59d42c0eb1d8fdfeec18f4ff088de8084bda906b;hp=1bcaea32cfc19dc70550a70a8c365c4af2d29c38;hpb=bbe5d235ee201705530a7153b57e141cd77d818b;p=linux-2.6-omap-h63xx.git diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h index 1bcaea32cfc..046e064b033 100644 --- a/drivers/usb/class/cdc-acm.h +++ b/drivers/usb/class/cdc-acm.h @@ -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