X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=drivers%2Fusb%2Fclass%2Fcdc-acm.h;h=046e064b033af6675bb48208b277f9967130c243;hb=cdbfc557c43ea1f1f9b7062300ecb1254969814b;hp=09f7765dbf8dc74ad223f42a3455d4dddb221c8d;hpb=8269cc4e2b0ddcdcb9e7f2034c464ef8613737a1;p=linux-2.6 diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h index 09f7765dbf..046e064b03 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,7 +90,7 @@ 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 */ @@ -103,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 */ @@ -120,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