aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/usb
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb')
-rw-r--r--include/linux/usb/serial.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index a4c99ea390e7..70b6d6b28997 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -35,6 +35,9 @@ enum port_dev_state {
35 PORT_UNREGISTERING, 35 PORT_UNREGISTERING,
36}; 36};
37 37
38/* USB serial flags */
39#define USB_SERIAL_WRITE_BUSY 0
40
38/** 41/**
39 * usb_serial_port: structure for the specific ports of a device. 42 * usb_serial_port: structure for the specific ports of a device.
40 * @serial: pointer back to the struct usb_serial owner of this port. 43 * @serial: pointer back to the struct usb_serial owner of this port.
@@ -60,10 +63,14 @@ enum port_dev_state {
60 * @write_urb: pointer to the bulk out struct urb for this port. 63 * @write_urb: pointer to the bulk out struct urb for this port.
61 * @write_fifo: kfifo used to buffer outgoing data 64 * @write_fifo: kfifo used to buffer outgoing data
62 * @write_urb_busy: port`s writing status 65 * @write_urb_busy: port`s writing status
66 * @bulk_out_buffers: pointers to the bulk out buffers for this port
67 * @write_urbs: pointers to the bulk out urbs for this port
68 * @write_urbs_free: status bitmap the for bulk out urbs
63 * @tx_bytes: number of bytes currently in host stack queues 69 * @tx_bytes: number of bytes currently in host stack queues
64 * @tx_urbs: number of urbs currently in host stack queues 70 * @tx_urbs: number of urbs currently in host stack queues
65 * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this 71 * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this
66 * port. 72 * port.
73 * @flags: usb serial port flags
67 * @write_wait: a wait_queue_head_t used by the port. 74 * @write_wait: a wait_queue_head_t used by the port.
68 * @work: work queue entry for the line discipline waking up. 75 * @work: work queue entry for the line discipline waking up.
69 * @throttled: nonzero if the read urb is inactive to throttle the device 76 * @throttled: nonzero if the read urb is inactive to throttle the device
@@ -98,11 +105,16 @@ struct usb_serial_port {
98 struct urb *write_urb; 105 struct urb *write_urb;
99 struct kfifo write_fifo; 106 struct kfifo write_fifo;
100 int write_urb_busy; 107 int write_urb_busy;
108
109 unsigned char *bulk_out_buffers[2];
110 struct urb *write_urbs[2];
111 unsigned long write_urbs_free;
101 __u8 bulk_out_endpointAddress; 112 __u8 bulk_out_endpointAddress;
102 113
103 int tx_bytes; 114 int tx_bytes;
104 int tx_urbs; 115 int tx_urbs;
105 116
117 unsigned long flags;
106 wait_queue_head_t write_wait; 118 wait_queue_head_t write_wait;
107 struct work_struct work; 119 struct work_struct work;
108 char throttled; 120 char throttled;