aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/class/cdc-acm.h
diff options
context:
space:
mode:
authorOliver Neukum <neukum@fachschaft.cup.uni-muenchen.de>2006-05-13 22:50:47 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2006-06-21 15:04:08 -0700
commit86478944eba887f149e151bacc023ae4b2d23ea6 (patch)
tree21c9871c1524c75cc702e0fbaa7700e82a9f744f /drivers/usb/class/cdc-acm.h
parent5cd330f4f30eb154e7af9210bed42dfcd447997f (diff)
[PATCH] USB: cdc-acm: add a new special case for modems with buggy firmware
this fixes the "duplicated text" bug. There's a modem that cannot cope with large transfers and more than one urb in flight. This patch adds a special case to the driver. Signed-off-by: Oliver Neukum <oliver@neukum.name> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/class/cdc-acm.h')
-rw-r--r--drivers/usb/class/cdc-acm.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
index fd2aaccdcba..1bcaea32cfc 100644
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -56,11 +56,11 @@
* in line disciplines. They ask for empty space amount, receive our URB size,
* and proceed to issue several 1-character writes, assuming they will fit.
* The very first write takes a complete URB. Fortunately, this only happens
- * when processing onlcr, so we only need 2 buffers.
+ * when processing onlcr, so we only need 2 buffers. These values must be
+ * powers of 2.
*/
-#define ACM_NWB 2
-#define ACM_NRU 16
-#define ACM_NRB 16
+#define ACM_NW 2
+#define ACM_NR 16
struct acm_wb {
unsigned char *buf;
@@ -91,9 +91,10 @@ struct acm {
struct urb *ctrlurb, *writeurb; /* urbs */
u8 *ctrl_buffer; /* buffers of urbs */
dma_addr_t ctrl_dma; /* dma handles of buffers */
- struct acm_wb wb[ACM_NWB];
- struct acm_ru ru[ACM_NRU];
- struct acm_rb rb[ACM_NRB];
+ struct acm_wb wb[ACM_NW];
+ struct acm_ru ru[ACM_NR];
+ struct acm_rb rb[ACM_NR];
+ int rx_buflimit;
int rx_endpoint;
spinlock_t read_lock;
struct list_head spare_read_urbs;
@@ -122,3 +123,4 @@ struct acm {
/* constants describing various quirks and errors */
#define NO_UNION_NORMAL 1
+#define SINGLE_RX_URB 2