#include <asm/unaligned.h>
#include <linux/errno.h>
#include <linux/slab.h>
#include <linux/tty.h>
#include <linux/tty_driver.h>
#include <linux/tty_flip.h>
#include <linux/module.h>
#include <linux/serial.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
#include <linux/serial_reg.h>
#include <linux/uaccess.h>
#define QT2_USB_TIMEOUT …
#define QT_OPEN_CLOSE_CHANNEL …
#define QT_SET_GET_DEVICE …
#define QT_SET_GET_REGISTER …
#define QT_GET_SET_PREBUF_TRIG_LVL …
#define QT_SET_ATF …
#define QT_TRANSFER_IN …
#define QT_HW_FLOW_CONTROL_MASK …
#define QT_SW_FLOW_CONTROL_MASK …
#define QT2_BREAK_CONTROL …
#define QT2_GET_SET_UART …
#define QT2_FLUSH_DEVICE …
#define QT2_GET_SET_QMCR …
#define QT2_QMCR_RS232 …
#define QT2_QMCR_RS422 …
#define SERIAL_CRTSCTS …
#define SERIAL_EVEN_PARITY …
#define QT2_CONTROL_BYTE …
#define QT2_LINE_STATUS …
#define QT2_MODEM_STATUS …
#define QT2_XMIT_HOLD …
#define QT2_CHANGE_PORT …
#define QT2_REC_FLUSH …
#define QT2_XMIT_FLUSH …
#define QT2_CONTROL_ESCAPE …
#define MAX_BAUD_RATE …
#define DEFAULT_BAUD_RATE …
#define QT2_READ_BUFFER_SIZE …
#define QT2_WRITE_BUFFER_SIZE …
#define QT2_WRITE_CONTROL_SIZE …
#define DRIVER_DESC …
#define USB_VENDOR_ID_QUATECH …
#define QUATECH_SSU2_100 …
#define QUATECH_DSU2_100 …
#define QUATECH_DSU2_400 …
#define QUATECH_QSU2_100 …
#define QUATECH_QSU2_400 …
#define QUATECH_ESU2_100 …
#define QUATECH_ESU2_400 …
struct qt2_device_detail { … };
#define QT_DETAILS(prod, ports) …
static const struct qt2_device_detail qt2_device_details[] = …;
static const struct usb_device_id id_table[] = …;
MODULE_DEVICE_TABLE(usb, id_table);
struct qt2_serial_private { … };
struct qt2_port_private { … };
static void qt2_update_lsr(struct usb_serial_port *port, unsigned char *ch);
static void qt2_update_msr(struct usb_serial_port *port, unsigned char *ch);
static void qt2_write_bulk_callback(struct urb *urb);
static void qt2_read_bulk_callback(struct urb *urb);
static void qt2_release(struct usb_serial *serial)
{ … }
static inline int calc_baud_divisor(int baudrate)
{ … }
static inline int qt2_set_port_config(struct usb_device *dev,
unsigned char port_number,
u16 baudrate, u16 lcr)
{ … }
static inline int qt2_control_msg(struct usb_device *dev,
u8 request, u16 data, u16 index)
{ … }
static inline int qt2_getregister(struct usb_device *dev,
u8 uart,
u8 reg,
u8 *data)
{ … }
static inline int qt2_setregister(struct usb_device *dev,
u8 uart, u8 reg, u16 data)
{ … }
static inline int update_mctrl(struct qt2_port_private *port_priv,
unsigned int set, unsigned int clear)
{ … }
static int qt2_calc_num_ports(struct usb_serial *serial,
struct usb_serial_endpoints *epds)
{ … }
static void qt2_set_termios(struct tty_struct *tty,
struct usb_serial_port *port,
const struct ktermios *old_termios)
{ … }
static int qt2_open(struct tty_struct *tty, struct usb_serial_port *port)
{ … }
static void qt2_close(struct usb_serial_port *port)
{ … }
static void qt2_disconnect(struct usb_serial *serial)
{ … }
static void qt2_process_status(struct usb_serial_port *port, unsigned char *ch)
{ … }
static void qt2_process_read_urb(struct urb *urb)
{ … }
static void qt2_write_bulk_callback(struct urb *urb)
{ … }
static void qt2_read_bulk_callback(struct urb *urb)
{ … }
static int qt2_setup_urbs(struct usb_serial *serial)
{ … }
static int qt2_attach(struct usb_serial *serial)
{ … }
static int qt2_port_probe(struct usb_serial_port *port)
{ … }
static void qt2_port_remove(struct usb_serial_port *port)
{ … }
static int qt2_tiocmget(struct tty_struct *tty)
{ … }
static int qt2_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{ … }
static int qt2_break_ctl(struct tty_struct *tty, int break_state)
{ … }
static void qt2_dtr_rts(struct usb_serial_port *port, int on)
{ … }
static void qt2_update_msr(struct usb_serial_port *port, unsigned char *ch)
{ … }
static void qt2_update_lsr(struct usb_serial_port *port, unsigned char *ch)
{ … }
static unsigned int qt2_write_room(struct tty_struct *tty)
{ … }
static int qt2_write(struct tty_struct *tty,
struct usb_serial_port *port,
const unsigned char *buf, int count)
{ … }
static struct usb_serial_driver qt2_device = …;
static struct usb_serial_driver *const serial_drivers[] = …;
module_usb_serial_driver(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;