vserver 1.9.5.x5
[linux-2.6.git] / drivers / usb / serial / usb-serial.h
index e2e5956..d1f0c40 100644 (file)
  * @interrupt_in_urb: pointer to the interrupt in struct urb for this port.
  * @interrupt_in_endpointAddress: endpoint address for the interrupt in pipe
  *     for this port.
+ * @interrupt_out_buffer: pointer to the interrupt out buffer for this port.
+ * @interrupt_out_size: the size of the interrupt_out_buffer, in bytes.
+ * @interrupt_out_urb: pointer to the interrupt out struct urb for this port.
+ * @interrupt_out_endpointAddress: endpoint address for the interrupt out pipe
+ *     for this port.
  * @bulk_in_buffer: pointer to the bulk in buffer for this port.
  * @read_urb: pointer to the bulk in struct urb for this port.
  * @bulk_in_endpointAddress: endpoint address for the bulk in pipe for this
@@ -99,7 +104,13 @@ struct usb_serial_port {
        struct urb *            interrupt_in_urb;
        __u8                    interrupt_in_endpointAddress;
 
+       unsigned char *         interrupt_out_buffer;
+       int                     interrupt_out_size;
+       struct urb *            interrupt_out_urb;
+       __u8                    interrupt_out_endpointAddress;
+
        unsigned char *         bulk_in_buffer;
+       int                     bulk_in_size;
        struct urb *            read_urb;
        __u8                    bulk_in_endpointAddress;
 
@@ -134,10 +145,9 @@ static inline void usb_set_serial_port_data (struct usb_serial_port *port, void
  * @minor: the starting minor number for this device
  * @num_ports: the number of ports this device has
  * @num_interrupt_in: number of interrupt in endpoints we have
+ * @num_interrupt_out: number of interrupt out endpoints we have
  * @num_bulk_in: number of bulk in endpoints we have
  * @num_bulk_out: number of bulk out endpoints we have
- * @vendor: vendor id of this device
- * @product: product id of this device
  * @port: array of struct usb_serial_port structures for the different ports.
  * @private: place to put any driver specific information that is needed.  The
  *     usb-serial driver is required to manage this data, the usb-serial core
@@ -152,10 +162,9 @@ struct usb_serial {
        unsigned char                   num_ports;
        unsigned char                   num_port_pointers;
        char                            num_interrupt_in;
+       char                            num_interrupt_out;
        char                            num_bulk_in;
        char                            num_bulk_out;
-       __u16                           vendor;
-       __u16                           product;
        struct usb_serial_port *        port[MAX_NUM_PORTS];
        struct kref                     kref;
        void *                          private;
@@ -187,6 +196,8 @@ static inline void usb_set_serial_data (struct usb_serial *serial, void *data)
  *     of the devices this structure can support.
  * @num_interrupt_in: the number of interrupt in endpoints this device will
  *     have.
+ * @num_interrupt_out: the number of interrupt out endpoints this device will
+ *     have.
  * @num_bulk_in: the number of bulk in endpoints this device will have.
  * @num_bulk_out: the number of bulk out endpoints this device will have.
  * @num_ports: the number of different ports this device will have.
@@ -219,6 +230,7 @@ struct usb_serial_device_type {
        char    *short_name;
        const struct usb_device_id *id_table;
        char    num_interrupt_in;
+       char    num_interrupt_out;
        char    num_bulk_in;
        char    num_bulk_out;
        char    num_ports;
@@ -238,7 +250,7 @@ struct usb_serial_device_type {
        /* serial function calls */
        int  (*open)            (struct usb_serial_port *port, struct file * filp);
        void (*close)           (struct usb_serial_port *port, struct file * filp);
-       int  (*write)           (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count);
+       int  (*write)           (struct usb_serial_port *port, const unsigned char *buf, int count);
        int  (*write_room)      (struct usb_serial_port *port);
        int  (*ioctl)           (struct usb_serial_port *port, struct file * file, unsigned int cmd, unsigned long arg);
        void (*set_termios)     (struct usb_serial_port *port, struct termios * old);
@@ -250,6 +262,7 @@ struct usb_serial_device_type {
        int  (*tiocmset)        (struct usb_serial_port *port, struct file *file, unsigned int set, unsigned int clear);
 
        void (*read_int_callback)(struct urb *urb, struct pt_regs *regs);
+       void (*write_int_callback)(struct urb *urb, struct pt_regs *regs);
        void (*read_bulk_callback)(struct urb *urb, struct pt_regs *regs);
        void (*write_bulk_callback)(struct urb *urb, struct pt_regs *regs);
 };
@@ -277,7 +290,7 @@ static inline void usb_serial_console_exit (void) { }
 /* Functions needed by other parts of the usbserial core */
 extern struct usb_serial *usb_serial_get_by_index (unsigned int minor);
 extern int usb_serial_generic_open (struct usb_serial_port *port, struct file *filp);
-extern int usb_serial_generic_write (struct usb_serial_port *port, int from_user, const unsigned char *buf, int count);
+extern int usb_serial_generic_write (struct usb_serial_port *port, const unsigned char *buf, int count);
 extern void usb_serial_generic_close (struct usb_serial_port *port, struct file *filp);
 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);