aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/class/cdc-acm.h
diff options
context:
space:
mode:
authorDavid Engraf <david.engraf@netcom.eu>2008-03-20 05:01:34 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2008-04-25 00:16:44 -0400
commite4cf3aa8f9cd6ee4d583b5d445b5c152acefcde4 (patch)
tree1e1a442763c227bbe0c72952f8e5e599ecd30a97 /drivers/usb/class/cdc-acm.h
parent28d1dfadd3ca07e7ec1c3de4f82ac2b8ece4be91 (diff)
USB: increase cdc-acm write throughput
the following patch uses 16 write urbs and a writsize of wMaxPacketSize * 20. With this patch I get the maximum througput from my linux system with 20MB/sec read and 15 MB/sec write (full speed 1 MB/sec both) I also deleted the flag URB_NO_FSBR for the writeurbs, because this makes my full speed devices significant slower. Signed-off-by: David Engraf <david.engraf@netcom.eu> 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.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/usb/class/cdc-acm.h b/drivers/usb/class/cdc-acm.h
index 8df6a57dcf9e..046e064b033a 100644
--- a/drivers/usb/class/cdc-acm.h
+++ b/drivers/usb/class/cdc-acm.h
@@ -59,7 +59,7 @@
59 * when processing onlcr, so we only need 2 buffers. These values must be 59 * when processing onlcr, so we only need 2 buffers. These values must be
60 * powers of 2. 60 * powers of 2.
61 */ 61 */
62#define ACM_NW 2 62#define ACM_NW 16
63#define ACM_NR 16 63#define ACM_NR 16
64 64
65struct acm_wb { 65struct acm_wb {
@@ -67,6 +67,8 @@ struct acm_wb {
67 dma_addr_t dmah; 67 dma_addr_t dmah;
68 int len; 68 int len;
69 int use; 69 int use;
70 struct urb *urb;
71 struct acm *instance;
70}; 72};
71 73
72struct acm_rb { 74struct acm_rb {
@@ -88,7 +90,7 @@ struct acm {
88 struct usb_interface *control; /* control interface */ 90 struct usb_interface *control; /* control interface */
89 struct usb_interface *data; /* data interface */ 91 struct usb_interface *data; /* data interface */
90 struct tty_struct *tty; /* the corresponding tty */ 92 struct tty_struct *tty; /* the corresponding tty */
91 struct urb *ctrlurb, *writeurb; /* urbs */ 93 struct urb *ctrlurb; /* urbs */
92 u8 *ctrl_buffer; /* buffers of urbs */ 94 u8 *ctrl_buffer; /* buffers of urbs */
93 dma_addr_t ctrl_dma; /* dma handles of buffers */ 95 dma_addr_t ctrl_dma; /* dma handles of buffers */
94 u8 *country_codes; /* country codes from device */ 96 u8 *country_codes; /* country codes from device */
@@ -103,7 +105,6 @@ struct acm {
103 struct list_head spare_read_urbs; 105 struct list_head spare_read_urbs;
104 struct list_head spare_read_bufs; 106 struct list_head spare_read_bufs;
105 struct list_head filled_read_bufs; 107 struct list_head filled_read_bufs;
106 int write_current; /* current write buffer */
107 int write_used; /* number of non-empty write buffers */ 108 int write_used; /* number of non-empty write buffers */
108 int write_ready; /* write urb is not running */ 109 int write_ready; /* write urb is not running */
109 spinlock_t write_lock; 110 spinlock_t write_lock;