summaryrefslogtreecommitdiff
path: root/include/linux/usb/serial.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/usb/serial.h')
-rw-r--r--include/linux/usb/serial.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/usb/serial.h b/include/linux/usb/serial.h
index 10f99e5f1a97..32acbae28d24 100644
--- a/include/linux/usb/serial.h
+++ b/include/linux/usb/serial.h
@@ -54,6 +54,8 @@
* @write_wait: a wait_queue_head_t used by the port.
* @work: work queue entry for the line discipline waking up.
* @open_count: number of times this port has been opened.
+ * @throttled: nonzero if the read urb is inactive to throttle the device
+ * @throttle_req: nonzero if the tty wants to throttle us
*
* This structure is used by the usb-serial core and drivers for the specific
* ports of a device.
@@ -88,6 +90,8 @@ struct usb_serial_port {
wait_queue_head_t write_wait;
struct work_struct work;
int open_count;
+ char throttled;
+ char throttle_req;
struct device dev;
};
#define to_usb_serial_port(d) container_of(d, struct usb_serial_port, dev)
@@ -179,6 +183,9 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data)
* memory structure allocation at this point in time.
* @shutdown: pointer to the driver's shutdown function. This will be
* called when the device is removed from the system.
+ * @usb_driver: pointer to the struct usb_driver that controls this
+ * device. This is necessary to allow dynamic ids to be added to
+ * the driver from sysfs.
*
* This structure is defines a USB Serial driver. It provides all of
* the information that the USB serial core code needs. If the function
@@ -202,6 +209,8 @@ struct usb_serial_driver {
struct list_head driver_list;
struct device_driver driver;
+ struct usb_driver *usb_driver;
+ struct usb_dynids dynids;
int (*probe) (struct usb_serial *serial, const struct usb_device_id *id);
int (*attach) (struct usb_serial *serial);
@@ -264,6 +273,8 @@ extern int usb_serial_generic_write_room (struct usb_serial_port *port);
extern int usb_serial_generic_chars_in_buffer (struct usb_serial_port *port);
extern void usb_serial_generic_read_bulk_callback (struct urb *urb);
extern void usb_serial_generic_write_bulk_callback (struct urb *urb);
+extern void usb_serial_generic_throttle (struct usb_serial_port *port);
+extern void usb_serial_generic_unthrottle (struct usb_serial_port *port);
extern void usb_serial_generic_shutdown (struct usb_serial *serial);
extern int usb_serial_generic_register (int debug);
extern void usb_serial_generic_deregister (void);