summaryrefslogtreecommitdiffstats
path: root/include/linux/usb/serial.h
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2011-11-06 19:06:37 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-11-15 10:46:13 -0800
commitd83b405383c965498923f3561c3321e2b5df5727 (patch)
treee3fea4f1f5ab17150acb55140ebfd5404edfd445 /include/linux/usb/serial.h
parentf5230a53c1d551811b077ccad219105786da1bec (diff)
downloadblackbird-op-linux-d83b405383c965498923f3561c3321e2b5df5727.tar.gz
blackbird-op-linux-d83b405383c965498923f3561c3321e2b5df5727.zip
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 {
* @read_urb: pointer to the bulk in struct urb for this port.
* @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this
* port.
+ * @bulk_in_buffers: pointers to the bulk in buffers for this port
+ * @read_urbs: pointers to the bulk in urbs for this port
+ * @read_urbs_free: status bitmap the for bulk in urbs
* @bulk_out_buffer: pointer to the bulk out buffer for this port.
* @bulk_out_size: the size of the bulk_out_buffer, in bytes.
* @write_urb: pointer to the bulk out struct urb for this port.
@@ -98,6 +101,10 @@ struct usb_serial_port {
struct urb *read_urb;
__u8 bulk_in_endpointAddress;
+ unsigned char *bulk_in_buffers[2];
+ struct urb *read_urbs[2];
+ unsigned long read_urbs_free;
+
unsigned char *bulk_out_buffer;
int bulk_out_size;
struct urb *write_urb;
@@ -338,7 +345,7 @@ extern void usb_serial_generic_disconnect(struct usb_serial *serial);
extern void usb_serial_generic_release(struct usb_serial *serial);
extern int usb_serial_generic_register(int debug);
extern void usb_serial_generic_deregister(void);
-extern int usb_serial_generic_submit_read_urb(struct usb_serial_port *port,
+extern int usb_serial_generic_submit_read_urbs(struct usb_serial_port *port,
gfp_t mem_flags);
extern void usb_serial_generic_process_read_urb(struct urb *urb);
extern int usb_serial_generic_prepare_write_buffer(struct usb_serial_port *port,
OpenPOWER on IntegriCloud