diff options
Diffstat (limited to 'include/linux/usb/serial.h')
-rw-r--r-- | include/linux/usb/serial.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h index 0ec50ba62139..ce911ebf91e8 100644 --- a/include/linux/usb/serial.h +++ b/include/linux/usb/serial.h | |||
@@ -59,6 +59,7 @@ enum port_dev_state { | |||
59 | * @bulk_out_buffer: pointer to the bulk out buffer for this port. | 59 | * @bulk_out_buffer: pointer to the bulk out buffer for this port. |
60 | * @bulk_out_size: the size of the bulk_out_buffer, in bytes. | 60 | * @bulk_out_size: the size of the bulk_out_buffer, in bytes. |
61 | * @write_urb: pointer to the bulk out struct urb for this port. | 61 | * @write_urb: pointer to the bulk out struct urb for this port. |
62 | * @write_fifo: kfifo used to buffer outgoing data | ||
62 | * @write_urb_busy: port`s writing status | 63 | * @write_urb_busy: port`s writing status |
63 | * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this | 64 | * @bulk_out_endpointAddress: endpoint address for the bulk out pipe for this |
64 | * port. | 65 | * port. |
@@ -96,6 +97,7 @@ struct usb_serial_port { | |||
96 | unsigned char *bulk_out_buffer; | 97 | unsigned char *bulk_out_buffer; |
97 | int bulk_out_size; | 98 | int bulk_out_size; |
98 | struct urb *write_urb; | 99 | struct urb *write_urb; |
100 | struct kfifo *write_fifo; | ||
99 | int write_urb_busy; | 101 | int write_urb_busy; |
100 | __u8 bulk_out_endpointAddress; | 102 | __u8 bulk_out_endpointAddress; |
101 | 103 | ||
@@ -148,6 +150,7 @@ struct usb_serial { | |||
148 | struct usb_interface *interface; | 150 | struct usb_interface *interface; |
149 | unsigned char disconnected:1; | 151 | unsigned char disconnected:1; |
150 | unsigned char suspending:1; | 152 | unsigned char suspending:1; |
153 | unsigned char attached:1; | ||
151 | unsigned char minor; | 154 | unsigned char minor; |
152 | unsigned char num_ports; | 155 | unsigned char num_ports; |
153 | unsigned char num_port_pointers; | 156 | unsigned char num_port_pointers; |
@@ -238,9 +241,8 @@ struct usb_serial_driver { | |||
238 | int (*resume)(struct usb_serial *serial); | 241 | int (*resume)(struct usb_serial *serial); |
239 | 242 | ||
240 | /* serial function calls */ | 243 | /* serial function calls */ |
241 | /* Called by console with tty = NULL and by tty */ | 244 | /* Called by console and by the tty layer */ |
242 | int (*open)(struct tty_struct *tty, | 245 | int (*open)(struct tty_struct *tty, struct usb_serial_port *port); |
243 | struct usb_serial_port *port, struct file *filp); | ||
244 | void (*close)(struct usb_serial_port *port); | 246 | void (*close)(struct usb_serial_port *port); |
245 | int (*write)(struct tty_struct *tty, struct usb_serial_port *port, | 247 | int (*write)(struct tty_struct *tty, struct usb_serial_port *port, |
246 | const unsigned char *buf, int count); | 248 | const unsigned char *buf, int count); |
@@ -261,6 +263,9 @@ struct usb_serial_driver { | |||
261 | be an attached tty at this point */ | 263 | be an attached tty at this point */ |
262 | void (*dtr_rts)(struct usb_serial_port *port, int on); | 264 | void (*dtr_rts)(struct usb_serial_port *port, int on); |
263 | int (*carrier_raised)(struct usb_serial_port *port); | 265 | int (*carrier_raised)(struct usb_serial_port *port); |
266 | /* Called by the usb serial hooks to allow the user to rework the | ||
267 | termios state */ | ||
268 | void (*init_termios)(struct tty_struct *tty); | ||
264 | /* USB events */ | 269 | /* USB events */ |
265 | void (*read_int_callback)(struct urb *urb); | 270 | void (*read_int_callback)(struct urb *urb); |
266 | void (*write_int_callback)(struct urb *urb); | 271 | void (*write_int_callback)(struct urb *urb); |
@@ -300,7 +305,7 @@ static inline void usb_serial_console_disconnect(struct usb_serial *serial) {} | |||
300 | extern struct usb_serial *usb_serial_get_by_index(unsigned int minor); | 305 | extern struct usb_serial *usb_serial_get_by_index(unsigned int minor); |
301 | extern void usb_serial_put(struct usb_serial *serial); | 306 | extern void usb_serial_put(struct usb_serial *serial); |
302 | extern int usb_serial_generic_open(struct tty_struct *tty, | 307 | extern int usb_serial_generic_open(struct tty_struct *tty, |
303 | struct usb_serial_port *port, struct file *filp); | 308 | struct usb_serial_port *port); |
304 | extern int usb_serial_generic_write(struct tty_struct *tty, | 309 | extern int usb_serial_generic_write(struct tty_struct *tty, |
305 | struct usb_serial_port *port, const unsigned char *buf, int count); | 310 | struct usb_serial_port *port, const unsigned char *buf, int count); |
306 | extern void usb_serial_generic_close(struct usb_serial_port *port); | 311 | extern void usb_serial_generic_close(struct usb_serial_port *port); |