summaryrefslogtreecommitdiffstats
path: root/include/linux/usb/serial.h
diff options
context:
space:
mode:
authorJohan Hovold <jhovold@gmail.com>2010-05-05 23:58:13 +0200
committerGreg Kroah-Hartman <gregkh@suse.de>2010-05-20 13:21:42 -0700
commitc23e5fc1f7dba228558b4a46e68f7af89515b13c (patch)
treeadd71b10dc2275c98d3439fe3756829c2ec0afc9 /include/linux/usb/serial.h
parent27c7acf22047fbe4ec4cc36b7c2610dba227697c (diff)
USB: serial: remove multi-urb write from generic driver
Remove multi-urb write from the generic driver and simplify the prepare_write_buffer prototype: int (*prepare_write_buffer)(struct usb_serial_port *port, void *dest, size_t size); The default implementation simply fills dest with data from port write fifo but drivers can override it if they need to process the outgoing data (e.g. add headers). Turn ftdi_sio into a generic fifo-based driver, which lowers CPU usage significantly for small writes while retaining maximum throughput. 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.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 70b6d6b2899..061c997ae0c 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -67,7 +67,6 @@ enum port_dev_state {
* @write_urbs: pointers to the bulk out urbs for this port
* @write_urbs_free: status bitmap the for bulk out urbs
* @tx_bytes: number of bytes currently in host stack queues
- * @tx_urbs: number of urbs currently in host stack queues
* @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this
* port.
* @flags: usb serial port flags
@@ -112,7 +111,6 @@ struct usb_serial_port {
__u8 bulk_out_endpointAddress;
int tx_bytes;
- int tx_urbs;
unsigned long flags;
wait_queue_head_t write_wait;
@@ -238,8 +236,6 @@ struct usb_serial_driver {
struct usb_driver *usb_driver;
struct usb_dynids dynids;
- unsigned char multi_urb_write:1;
-
size_t bulk_in_size;
size_t bulk_out_size;
@@ -291,7 +287,7 @@ struct usb_serial_driver {
void (*process_read_urb)(struct urb *urb);
/* Called by the generic write implementation */
int (*prepare_write_buffer)(struct usb_serial_port *port,
- void **dest, size_t size, const void *src, size_t count);
+ void *dest, size_t size);
};
#define to_usb_serial_driver(d) \
container_of(d, struct usb_serial_driver, driver)
@@ -345,7 +341,7 @@ extern int usb_serial_generic_submit_read_urb(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,
- void **dest, size_t size, const void *src, size_t count);
+ void *dest, size_t size);
extern int usb_serial_handle_sysrq_char(struct tty_struct *tty,
struct usb_serial_port *port,
unsigned int ch);