aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb/serial.h
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2011-11-06 13:06:37 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-15 13:46:13 -0500
commitd83b405383c965498923f3561c3321e2b5df5727 (patch)
treee3fea4f1f5ab17150acb55140ebfd5404edfd445 /include/linux/usb/serial.h
parentf5230a53c1d551811b077ccad219105786da1bec (diff)
USB: serial: add support for multiple read urbs
Add support for multiple read urbs to generic read implementation. Use a static array of two read urbs for now which is enough to get a 50% throughput increase in one test setup. Signed-off-by: Johan Hovold <jhovold@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'include/linux/usb/serial.h')
-rw-r--r--include/linux/usb/serial.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 8ccd405e9005..4267a9c717ba 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -58,6 +58,9 @@ enum port_dev_state {
58 * @read_urb: pointer to the bulk in struct urb for this port. 58 * @read_urb: pointer to the bulk in struct urb for this port.
59 * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this 59 * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this
60 * port. 60 * port.
61 * @bulk_in_buffers: pointers to the bulk in buffers for this port
62 * @read_urbs: pointers to the bulk in urbs for this port
63 * @read_urbs_free: status bitmap the for bulk in urbs
61 * @bulk_out_buffer: pointer to the bulk out buffer for this port. 64 * @bulk_out_buffer: pointer to the bulk out buffer for this port.
62 * @bulk_out_size: the size of the bulk_out_buffer, in bytes. 65 * @bulk_out_size: the size of the bulk_out_buffer, in bytes.
63 * @write_urb: pointer to the bulk out struct urb for this port. 66 * @write_urb: pointer to the bulk out struct urb for this port.
@@ -98,6 +101,10 @@ struct usb_serial_port {
98 struct urb *read_urb; 101 struct urb *read_urb;
99 __u8 bulk_in_endpointAddress; 102 __u8 bulk_in_endpointAddress;
100 103
104 unsigned char *bulk_in_buffers[2];
105 struct urb *read_urbs[2];
106 unsigned long read_urbs_free;
107
101 unsigned char *bulk_out_buffer; 108 unsigned char *bulk_out_buffer;
102 int bulk_out_size; 109 int bulk_out_size;
103 struct urb *write_urb; 110 struct urb *write_urb;
@@ -338,7 +345,7 @@ extern void usb_serial_generic_disconnect(struct usb_serial *serial);
338extern void usb_serial_generic_release(struct usb_serial *serial); 345extern void usb_serial_generic_release(struct usb_serial *serial);
339extern int usb_serial_generic_register(int debug); 346extern int usb_serial_generic_register(int debug);
340extern void usb_serial_generic_deregister(void); 347extern void usb_serial_generic_deregister(void);
341extern int usb_serial_generic_submit_read_urb(struct usb_serial_port *port, 348extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port,
342 gfp_t mem_flags); 349 gfp_t mem_flags);
343extern void usb_serial_generic_process_read_urb(struct urb *urb); 350extern void usb_serial_generic_process_read_urb(struct urb *urb);
344extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port, 351extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port,