#include <linux/kernel.h>
#include <linux/jiffies.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/spinlock.h>
#include <linux/uaccess.h>
#include <linux/usb.h>
#include <linux/usb/serial.h>
#include <linux/usb/ezusb.h>
#define DRIVER_AUTHOR …
#define DRIVER_DESC …
static void keyspan_send_setup(struct usb_serial_port *port, int reset_port);
static int keyspan_usa19_calc_baud(struct usb_serial_port *port,
u32 baud_rate, u32 baudclk,
u8 *rate_hi, u8 *rate_low,
u8 *prescaler, int portnum);
static int keyspan_usa19w_calc_baud(struct usb_serial_port *port,
u32 baud_rate, u32 baudclk,
u8 *rate_hi, u8 *rate_low,
u8 *prescaler, int portnum);
static int keyspan_usa28_calc_baud(struct usb_serial_port *port,
u32 baud_rate, u32 baudclk,
u8 *rate_hi, u8 *rate_low,
u8 *prescaler, int portnum);
static int keyspan_usa19hs_calc_baud(struct usb_serial_port *port,
u32 baud_rate, u32 baudclk,
u8 *rate_hi, u8 *rate_low,
u8 *prescaler, int portnum);
static int keyspan_usa28_send_setup(struct usb_serial *serial,
struct usb_serial_port *port,
int reset_port);
static int keyspan_usa26_send_setup(struct usb_serial *serial,
struct usb_serial_port *port,
int reset_port);
static int keyspan_usa49_send_setup(struct usb_serial *serial,
struct usb_serial_port *port,
int reset_port);
static int keyspan_usa90_send_setup(struct usb_serial *serial,
struct usb_serial_port *port,
int reset_port);
static int keyspan_usa67_send_setup(struct usb_serial *serial,
struct usb_serial_port *port,
int reset_port);
#define KEYSPAN_INVALID_BAUD_RATE …
#define KEYSPAN_BAUD_RATE_OK …
#define KEYSPAN_USA18X_BAUDCLK …
#define KEYSPAN_USA19_BAUDCLK …
#define KEYSPAN_USA19W_BAUDCLK …
#define KEYSPAN_USA19HS_BAUDCLK …
#define KEYSPAN_USA28_BAUDCLK …
#define KEYSPAN_USA28X_BAUDCLK …
#define KEYSPAN_USA49W_BAUDCLK …
#define KEYSPAN_MAX_NUM_PORTS …
#define KEYSPAN_MAX_FLIPS …
#define KEYSPAN_VENDOR_ID …
#define keyspan_usa18x_pre_product_id …
#define keyspan_usa19_pre_product_id …
#define keyspan_usa19qi_pre_product_id …
#define keyspan_mpr_pre_product_id …
#define keyspan_usa19qw_pre_product_id …
#define keyspan_usa19w_pre_product_id …
#define keyspan_usa28_pre_product_id …
#define keyspan_usa28x_pre_product_id …
#define keyspan_usa28xa_pre_product_id …
#define keyspan_usa28xb_pre_product_id …
#define keyspan_usa49w_pre_product_id …
#define keyspan_usa49wlc_pre_product_id …
#define keyspan_usa18x_product_id …
#define keyspan_usa19_product_id …
#define keyspan_usa19qi_product_id …
#define keyspan_usa19hs_product_id …
#define keyspan_mpr_product_id …
#define keyspan_usa19qw_product_id …
#define keyspan_usa19w_product_id …
#define keyspan_usa28_product_id …
#define keyspan_usa28x_product_id …
#define keyspan_usa28xa_product_id …
#define keyspan_usa28xb_product_id …
#define keyspan_usa28xg_product_id …
#define keyspan_usa49w_product_id …
#define keyspan_usa49wlc_product_id …
#define keyspan_usa49wg_product_id …
struct keyspan_device_details { … };
static const struct keyspan_device_details usa18x_device_details = …;
static const struct keyspan_device_details usa19_device_details = …;
static const struct keyspan_device_details usa19qi_device_details = …;
static const struct keyspan_device_details mpr_device_details = …;
static const struct keyspan_device_details usa19qw_device_details = …;
static const struct keyspan_device_details usa19w_device_details = …;
static const struct keyspan_device_details usa19hs_device_details = …;
static const struct keyspan_device_details usa28_device_details = …;
static const struct keyspan_device_details usa28x_device_details = …;
static const struct keyspan_device_details usa28xa_device_details = …;
static const struct keyspan_device_details usa28xg_device_details = …;
static const struct keyspan_device_details usa49w_device_details = …;
static const struct keyspan_device_details usa49wlc_device_details = …;
static const struct keyspan_device_details usa49wg_device_details = …;
static const struct keyspan_device_details *keyspan_devices[] = …;
static const struct usb_device_id keyspan_ids_combined[] = …;
MODULE_DEVICE_TABLE(usb, keyspan_ids_combined);
static const struct usb_device_id keyspan_pre_ids[] = …;
static const struct usb_device_id keyspan_1port_ids[] = …;
static const struct usb_device_id keyspan_2port_ids[] = …;
static const struct usb_device_id keyspan_4port_ids[] = …;
#define INSTAT_BUFLEN …
#define GLOCONT_BUFLEN …
#define INDAT49W_BUFLEN …
#define IN_BUFLEN …
#define OUT_BUFLEN …
#define INACK_BUFLEN …
#define OUTCONT_BUFLEN …
struct keyspan_serial_private { … };
struct keyspan_port_private { … };
#include "keyspan_usa26msg.h"
#include "keyspan_usa28msg.h"
#include "keyspan_usa49msg.h"
#include "keyspan_usa90msg.h"
#include "keyspan_usa67msg.h"
static int keyspan_break_ctl(struct tty_struct *tty, int break_state)
{ … }
static void keyspan_set_termios(struct tty_struct *tty,
struct usb_serial_port *port,
const struct ktermios *old_termios)
{ … }
static int keyspan_tiocmget(struct tty_struct *tty)
{ … }
static int keyspan_tiocmset(struct tty_struct *tty,
unsigned int set, unsigned int clear)
{ … }
static int keyspan_write(struct tty_struct *tty,
struct usb_serial_port *port, const unsigned char *buf, int count)
{ … }
static void usa26_indat_callback(struct urb *urb)
{ … }
static void usa2x_outdat_callback(struct urb *urb)
{ … }
static void usa26_inack_callback(struct urb *urb)
{ … }
static void usa26_outcont_callback(struct urb *urb)
{ … }
static void usa26_instat_callback(struct urb *urb)
{ … }
static void usa26_glocont_callback(struct urb *urb)
{ … }
static void usa28_indat_callback(struct urb *urb)
{ … }
static void usa28_inack_callback(struct urb *urb)
{ … }
static void usa28_outcont_callback(struct urb *urb)
{ … }
static void usa28_instat_callback(struct urb *urb)
{ … }
static void usa28_glocont_callback(struct urb *urb)
{ … }
static void usa49_glocont_callback(struct urb *urb)
{ … }
static void usa49_instat_callback(struct urb *urb)
{ … }
static void usa49_inack_callback(struct urb *urb)
{ … }
static void usa49_indat_callback(struct urb *urb)
{ … }
static void usa49wg_indat_callback(struct urb *urb)
{ … }
static void usa49_outcont_callback(struct urb *urb)
{ … }
static void usa90_indat_callback(struct urb *urb)
{ … }
static void usa90_instat_callback(struct urb *urb)
{ … }
static void usa90_outcont_callback(struct urb *urb)
{ … }
static void usa67_instat_callback(struct urb *urb)
{ … }
static void usa67_glocont_callback(struct urb *urb)
{ … }
static unsigned int keyspan_write_room(struct tty_struct *tty)
{ … }
static int keyspan_open(struct tty_struct *tty, struct usb_serial_port *port)
{ … }
static void keyspan_dtr_rts(struct usb_serial_port *port, int on)
{ … }
static void keyspan_close(struct usb_serial_port *port)
{ … }
static int keyspan_fake_startup(struct usb_serial *serial)
{ … }
static struct usb_endpoint_descriptor const *find_ep(struct usb_serial const *serial,
int endpoint)
{ … }
static struct urb *keyspan_setup_urb(struct usb_serial *serial, int endpoint,
int dir, void *ctx, char *buf, int len,
void (*callback)(struct urb *))
{ … }
static struct callbacks { … } keyspan_callbacks[] = …;
static void keyspan_setup_urbs(struct usb_serial *serial)
{ … }
static int keyspan_usa19_calc_baud(struct usb_serial_port *port,
u32 baud_rate, u32 baudclk, u8 *rate_hi,
u8 *rate_low, u8 *prescaler, int portnum)
{ … }
static int keyspan_usa19hs_calc_baud(struct usb_serial_port *port,
u32 baud_rate, u32 baudclk, u8 *rate_hi,
u8 *rate_low, u8 *prescaler, int portnum)
{ … }
static int keyspan_usa19w_calc_baud(struct usb_serial_port *port,
u32 baud_rate, u32 baudclk, u8 *rate_hi,
u8 *rate_low, u8 *prescaler, int portnum)
{ … }
static int keyspan_usa28_calc_baud(struct usb_serial_port *port,
u32 baud_rate, u32 baudclk, u8 *rate_hi,
u8 *rate_low, u8 *prescaler, int portnum)
{ … }
static int keyspan_usa26_send_setup(struct usb_serial *serial,
struct usb_serial_port *port,
int reset_port)
{ … }
static int keyspan_usa28_send_setup(struct usb_serial *serial,
struct usb_serial_port *port,
int reset_port)
{ … }
static int keyspan_usa49_send_setup(struct usb_serial *serial,
struct usb_serial_port *port,
int reset_port)
{ … }
static int keyspan_usa90_send_setup(struct usb_serial *serial,
struct usb_serial_port *port,
int reset_port)
{ … }
static int keyspan_usa67_send_setup(struct usb_serial *serial,
struct usb_serial_port *port,
int reset_port)
{ … }
static void keyspan_send_setup(struct usb_serial_port *port, int reset_port)
{ … }
static int keyspan_startup(struct usb_serial *serial)
{ … }
static void keyspan_disconnect(struct usb_serial *serial)
{ … }
static void keyspan_release(struct usb_serial *serial)
{ … }
static int keyspan_port_probe(struct usb_serial_port *port)
{ … }
static void keyspan_port_remove(struct usb_serial_port *port)
{ … }
static struct usb_serial_driver keyspan_pre_device = …;
static struct usb_serial_driver keyspan_1port_device = …;
static struct usb_serial_driver keyspan_2port_device = …;
static struct usb_serial_driver keyspan_4port_device = …;
static struct usb_serial_driver * const serial_drivers[] = …;
module_usb_serial_driver(…);
MODULE_AUTHOR(…);
MODULE_DESCRIPTION(…);
MODULE_LICENSE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;