summaryrefslogtreecommitdiffstats
path: root/drivers/usb/serial/usb-serial.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2005-04-23 12:49:16 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2005-06-27 14:43:47 -0700
commit507ca9bc0476662f3463888d583864834eab1e11 (patch)
tree421a373de235fcb4cb46a4723a1e9f00a71f709a /drivers/usb/serial/usb-serial.h
parentf4df0e334a9fc731689e8ba4f42a0d72a7491348 (diff)
[PATCH] USB: add ability for usb-serial drivers to determine if their write urb is currently being used.
This removes a lot of racy and buggy code by trying to check the status of the urb. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/serial/usb-serial.h')
-rw-r--r--drivers/usb/serial/usb-serial.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/serial/usb-serial.h b/drivers/usb/serial/usb-serial.h
index d1f0c4057fa..57f92f054c7 100644
--- a/drivers/usb/serial/usb-serial.h
+++ b/drivers/usb/serial/usb-serial.h
@@ -69,6 +69,7 @@
* usb_serial_port: structure for the specific ports of a device.
* @serial: pointer back to the struct usb_serial owner of this port.
* @tty: pointer to the corresponding tty for this port.
+ * @lock: spinlock to grab when updating portions of this structure.
* @number: the number of the port (the minor number).
* @interrupt_in_buffer: pointer to the interrupt in buffer for this port.
* @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
@@ -98,6 +99,7 @@
struct usb_serial_port {
struct usb_serial * serial;
struct tty_struct * tty;
+ spinlock_t lock;
unsigned char number;
unsigned char * interrupt_in_buffer;
@@ -117,6 +119,7 @@ struct usb_serial_port {
unsigned char * bulk_out_buffer;
int bulk_out_size;
struct urb * write_urb;
+ int write_urb_busy;
__u8 bulk_out_endpointAddress;
wait_queue_head_t write_wait;