/* USB Driver for GSM modems Copyright (C) 2005 Matthias Urlichs <smurf@smurf.noris.de> This driver is free software; you can redistribute it and/or modify it under the terms of Version 2 of the GNU General Public License as published by the Free Software Foundation. Portions copied from the Keyspan driver by Hugh Blemings <hugh@blemings.org> History: see the git log. Work sponsored by: Sigos GmbH, Germany <info@sigos.de> This driver exists because the "normal" serial driver doesn't work too well with GSM modems. Issues: - data loss -- one single Receive URB is not nearly enough - nonstandard flow (Option devices) control - controlling the baud rate doesn't make sense This driver is named "option" because the most common device it's used for is a PC-Card (with an internal OHCI-USB interface, behind which the GSM interface sits), made by Option Inc. Some of the "one port" devices actually exhibit multiple USB instances on the USB bus. This is not a bug, these ports are used for different device features.*/#define DRIVER_VERSION "v0.7.2"#define DRIVER_AUTHOR "Matthias Urlichs <smurf@smurf.noris.de>"#define DRIVER_DESC "USB Driver for GSM modems"#include<linux/kernel.h>#include<linux/jiffies.h>#include<linux/errno.h>#include<linux/tty.h>#include<linux/tty_flip.h>#include<linux/slab.h>#include<linux/module.h>#include<linux/bitops.h>#include<linux/usb.h>#include<linux/usb/serial.h>#include"usb-wwan.h"/* Function prototypes */staticintoption_probe(structusb_serial*serial,conststructusb_device_id*id);staticintoption_send_setup(structusb_serial_port*port);staticvoidoption_instat_callback(structurb*urb);/* Vendor and product IDs */#define OPTION_VENDOR_ID 0x0AF0#define OPTION_PRODUCT_COLT 0x5000#define OPTION_PRODUCT_RICOLA 0x6000#define OPTION_PRODUCT_RICOLA_LIGHT 0x6100#define OPTION_PRODUCT_RICOLA_QUAD 0x6200#define OPTION_PRODUCT_RICOLA_QUAD_LIGHT 0x6300#define OPTION_PRODUCT_RICOLA_NDIS 0x6050#define OPTION_PRODUCT_RICOLA_NDIS_LIGHT 0x6150#define OPTION_PRODUCT_RICOLA_NDIS_QUAD 0x6250#define OPTION_PRODUCT_RICOLA_NDIS_QUAD_LIGHT 0x6350#define OPTION_PRODUCT_COBRA 0x6500#define OPTION_PRODUCT_COBRA_BUS 0x6501#define OPTION_PRODUCT_VIPER 0x6600#define OPTION_PRODUCT_VIPER_BUS 0x6601#define OPTION_PRODUCT_GT_MAX_READY 0x6701#define OPTION_PRODUCT_FUJI_MODEM_LIGHT 0x6721#define OPTION_PRODUCT_FUJI_MODEM_GT 0x6741#define OPTION_PRODUCT_FUJI_MODEM_EX 0x6761#define OPTION_PRODUCT_KOI_MODEM 0x6800#define OPTION_PRODUCT_SCORPION_MODEM 0x6901#define OPTION_PRODUCT_ETNA_MODEM 0x7001#define OPTION_PRODUCT_ETNA_MODEM_LITE 0x7021