kernel: USB update from stlinux24_217
This commit is contained in:
@@ -94,6 +94,7 @@ static struct usb_device_id id_table [] = {
|
||||
{ USB_DEVICE(0x10C4, 0x818B) }, /* AVIT Research USB to TTL */
|
||||
{ USB_DEVICE(0x10C4, 0x819F) }, /* MJS USB Toslink Switcher */
|
||||
{ USB_DEVICE(0x10C4, 0x81A6) }, /* ThinkOptics WavIt */
|
||||
{ USB_DEVICE(0x10C4, 0x81A9) }, /* Multiplex RC Interface */
|
||||
{ USB_DEVICE(0x10C4, 0x81AC) }, /* MSD Dash Hawk */
|
||||
{ USB_DEVICE(0x10C4, 0x81AD) }, /* INSYS USB Modem */
|
||||
{ USB_DEVICE(0x10C4, 0x81C8) }, /* Lipowsky Industrie Elektronik GmbH, Baby-JTAG */
|
||||
@@ -135,10 +136,13 @@ static struct usb_device_id id_table [] = {
|
||||
{ USB_DEVICE(0x16DC, 0x0011) }, /* W-IE-NE-R Plein & Baus GmbH RCM Remote Control for MARATON Power Supply */
|
||||
{ USB_DEVICE(0x16DC, 0x0012) }, /* W-IE-NE-R Plein & Baus GmbH MPOD Multi Channel Power Supply */
|
||||
{ USB_DEVICE(0x16DC, 0x0015) }, /* W-IE-NE-R Plein & Baus GmbH CML Control, Monitoring and Data Logger */
|
||||
{ USB_DEVICE(0x17A8, 0x0001) }, /* Kamstrup Optical Eye/3-wire */
|
||||
{ USB_DEVICE(0x17A8, 0x0005) }, /* Kamstrup M-Bus Master MultiPort 250D */
|
||||
{ USB_DEVICE(0x17F4, 0xAAAA) }, /* Wavesense Jazz blood glucose meter */
|
||||
{ USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
|
||||
{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
|
||||
{ USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
|
||||
{ USB_DEVICE(0x3195, 0xF190) }, /* Link Instruments MSO-19 */
|
||||
{ USB_DEVICE(0x413C, 0x9500) }, /* DW700 GPS USB interface */
|
||||
{ } /* Terminating Entry */
|
||||
};
|
||||
@@ -359,8 +363,8 @@ static inline int cp210x_set_config_single(struct usb_serial_port *port,
|
||||
* Quantises the baud rate as per AN205 Table 1
|
||||
*/
|
||||
static unsigned int cp210x_quantise_baudrate(unsigned int baud) {
|
||||
if (baud <= 56) baud = 0;
|
||||
else if (baud <= 300) baud = 300;
|
||||
if (baud <= 300)
|
||||
baud = 300;
|
||||
else if (baud <= 600) baud = 600;
|
||||
else if (baud <= 1200) baud = 1200;
|
||||
else if (baud <= 1800) baud = 1800;
|
||||
|
@@ -105,6 +105,7 @@ static int ftdi_jtag_probe(struct usb_serial *serial);
|
||||
static int ftdi_mtxorb_hack_setup(struct usb_serial *serial);
|
||||
static int ftdi_NDI_device_setup(struct usb_serial *serial);
|
||||
static int ftdi_stmclite_probe(struct usb_serial *serial);
|
||||
static int ftdi_8u2232c_probe(struct usb_serial *serial);
|
||||
static void ftdi_USB_UIRT_setup(struct ftdi_private *priv);
|
||||
static void ftdi_HE_TIRA1_setup(struct ftdi_private *priv);
|
||||
|
||||
@@ -132,6 +133,10 @@ static struct ftdi_sio_quirk ftdi_stmclite_quirk = {
|
||||
.probe = ftdi_stmclite_probe,
|
||||
};
|
||||
|
||||
static struct ftdi_sio_quirk ftdi_8u2232c_quirk = {
|
||||
.probe = ftdi_8u2232c_probe,
|
||||
};
|
||||
|
||||
/*
|
||||
* The 8U232AM has the same API as the sio except for:
|
||||
* - it can support MUCH higher baudrates; up to:
|
||||
@@ -155,6 +160,7 @@ static struct ftdi_sio_quirk ftdi_stmclite_quirk = {
|
||||
* /sys/bus/usb/ftdi_sio/new_id, then send patch/report!
|
||||
*/
|
||||
static struct usb_device_id id_table_combined [] = {
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_AMC232_PID) },
|
||||
@@ -181,7 +187,8 @@ static struct usb_device_id id_table_combined [] = {
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_8U232AM_ALT_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_232RL_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_8U2232C_PID) ,
|
||||
.driver_info = (kernel_ulong_t)&ftdi_8u2232c_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_4232H_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_MICRO_CHAMELEON_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_RELAIS_PID) },
|
||||
@@ -203,6 +210,8 @@ static struct usb_device_id id_table_combined [] = {
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_XF_640_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_XF_642_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_DSS20_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_URBAN_0_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_URBAN_1_PID) },
|
||||
{ USB_DEVICE(FTDI_NF_RIC_VID, FTDI_NF_RIC_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_VNHCPCUSB_D_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_MTXORB_0_PID) },
|
||||
@@ -730,6 +739,7 @@ static struct usb_device_id id_table_combined [] = {
|
||||
{ USB_DEVICE(TML_VID, TML_USB_SERIAL_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_ELSTER_UNICOM_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_PROPOX_JTAGCABLEII_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_PROPOX_ISPCABLEIII_PID) },
|
||||
{ USB_DEVICE(OLIMEX_VID, OLIMEX_ARM_USB_OCD_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FIC_VID, FIC_NEO1973_DEBUG_PID),
|
||||
@@ -740,6 +750,8 @@ static struct usb_device_id id_table_combined [] = {
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, LMI_LM3S_EVAL_BOARD_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, LMI_LM3S_ICDI_BOARD_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_TURTELIZER_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(RATOC_VENDOR_ID, RATOC_PRODUCT_ID_USB60F) },
|
||||
@@ -786,6 +798,7 @@ static struct usb_device_id id_table_combined [] = {
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(ADI_VID, ADI_GNICEPLUS_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(HORNBY_VID, HORNBY_ELITE_PID) },
|
||||
{ USB_DEVICE(JETI_VID, JETI_SPC1201_PID) },
|
||||
{ USB_DEVICE(MARVELL_VID, MARVELL_SHEEVAPLUG_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
@@ -794,6 +807,8 @@ static struct usb_device_id id_table_combined [] = {
|
||||
{ USB_DEVICE(BAYER_VID, BAYER_CONTOUR_CABLE_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, MARVELL_OPENRD_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, TI_XDS100V2_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, HAMEG_HO820_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, HAMEG_HO720_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, HAMEG_HO730_PID) },
|
||||
@@ -825,11 +840,13 @@ static struct usb_device_id id_table_combined [] = {
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LOGBOOKML_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_LS_LOGBOOK_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_SCIENCESCOPE_HS_LOGBOOK_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_CINTERION_MC55I_PID) },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_DOTEC_PID) },
|
||||
{ USB_DEVICE(QIHARDWARE_VID, MILKYMISTONE_JTAGSERIAL_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(ST_VID, ST_STMCLT1030_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_stmclite_quirk },
|
||||
{ USB_DEVICE(FTDI_VID, FTDI_RF_R106) },
|
||||
{ }, /* Optional parameter entry */
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
@@ -1339,8 +1356,7 @@ static int set_serial_info(struct tty_struct *tty,
|
||||
goto check_and_exit;
|
||||
}
|
||||
|
||||
if ((new_serial.baud_base != priv->baud_base) &&
|
||||
(new_serial.baud_base < 9600)) {
|
||||
if (new_serial.baud_base != priv->baud_base) {
|
||||
unlock_kernel();
|
||||
return -EINVAL;
|
||||
}
|
||||
@@ -1762,6 +1778,19 @@ static int ftdi_jtag_probe(struct usb_serial *serial)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ftdi_8u2232c_probe(struct usb_serial *serial)
|
||||
{
|
||||
struct usb_device *udev = serial->dev;
|
||||
|
||||
dbg("%s", __func__);
|
||||
|
||||
if ((udev->manufacturer) &&
|
||||
(strcmp(udev->manufacturer, "CALAO Systems") == 0))
|
||||
return ftdi_jtag_probe(serial);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* First and second port on STMCLiteadaptors is reserved for JTAG interface
|
||||
* and the forth port for pio
|
||||
@@ -1841,6 +1870,7 @@ static int ftdi_submit_read_urb(struct usb_serial_port *port, gfp_t mem_flags)
|
||||
|
||||
static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
{ /* ftdi_open */
|
||||
struct ktermios dummy;
|
||||
struct usb_device *dev = port->serial->dev;
|
||||
struct ftdi_private *priv = usb_get_serial_port_data(port);
|
||||
unsigned long flags;
|
||||
@@ -1868,8 +1898,10 @@ static int ftdi_open(struct tty_struct *tty, struct usb_serial_port *port)
|
||||
This is same behaviour as serial.c/rs_open() - Kuba */
|
||||
|
||||
/* ftdi_set_termios will send usb control messages */
|
||||
if (tty)
|
||||
ftdi_set_termios(tty, port, tty->termios);
|
||||
if (tty) {
|
||||
memset(&dummy, 0, sizeof(dummy));
|
||||
ftdi_set_termios(tty, port, &dummy);
|
||||
}
|
||||
|
||||
/* Not throttled */
|
||||
spin_lock_irqsave(&port->lock, flags);
|
||||
@@ -2332,13 +2364,23 @@ static void ftdi_set_termios(struct tty_struct *tty,
|
||||
|
||||
cflag = termios->c_cflag;
|
||||
|
||||
/* FIXME -For this cut I don't care if the line is really changing or
|
||||
not - so just do the change regardless - should be able to
|
||||
compare old_termios and tty->termios */
|
||||
if (!old_termios)
|
||||
goto no_skip;
|
||||
|
||||
if (old_termios->c_cflag == termios->c_cflag
|
||||
&& old_termios->c_ispeed == termios->c_ispeed
|
||||
&& old_termios->c_ospeed == termios->c_ospeed)
|
||||
goto no_c_cflag_changes;
|
||||
|
||||
/* NOTE These routines can get interrupted by
|
||||
ftdi_sio_read_bulk_callback - need to examine what this means -
|
||||
don't see any problems yet */
|
||||
|
||||
if ((old_termios->c_cflag & (CSIZE|PARODD|PARENB|CMSPAR|CSTOPB)) ==
|
||||
(termios->c_cflag & (CSIZE|PARODD|PARENB|CMSPAR|CSTOPB)))
|
||||
goto no_data_parity_stop_changes;
|
||||
|
||||
no_skip:
|
||||
/* Set number of data bits, parity, stop bits */
|
||||
|
||||
termios->c_cflag &= ~CMSPAR;
|
||||
@@ -2375,6 +2417,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
|
||||
}
|
||||
|
||||
/* Now do the baudrate */
|
||||
no_data_parity_stop_changes:
|
||||
if ((cflag & CBAUD) == B0) {
|
||||
/* Disable flow control */
|
||||
if (usb_control_msg(dev, usb_sndctrlpipe(dev, 0),
|
||||
@@ -2400,6 +2443,7 @@ static void ftdi_set_termios(struct tty_struct *tty,
|
||||
|
||||
/* Set flow control */
|
||||
/* Note device also supports DTR/CD (ugh) and Xon/Xoff in hardware */
|
||||
no_c_cflag_changes:
|
||||
if (cflag & CRTSCTS) {
|
||||
dbg("%s Setting to CRTSCTS flow control", __func__);
|
||||
if (usb_control_msg(dev,
|
||||
|
@@ -38,6 +38,13 @@
|
||||
/* www.candapter.com Ewert Energy Systems CANdapter device */
|
||||
#define FTDI_CANDAPTER_PID 0x9F80 /* Product Id */
|
||||
|
||||
/*
|
||||
* Texas Instruments XDS100v2 JTAG / BeagleBone A3
|
||||
* http://processors.wiki.ti.com/index.php/XDS100
|
||||
* http://beagleboard.org/bone
|
||||
*/
|
||||
#define TI_XDS100V2_PID 0xa6d0
|
||||
|
||||
#define FTDI_NXTCAM_PID 0xABB8 /* NXTCam for Mindstorms NXT */
|
||||
|
||||
/* US Interface Navigator (http://www.usinterface.com/) */
|
||||
@@ -53,6 +60,7 @@
|
||||
/* FTDI 2332C Dual channel device, side A=245 FIFO (JTAG), Side B=RS232 UART */
|
||||
#define LMI_LM3S_DEVEL_BOARD_PID 0xbcd8
|
||||
#define LMI_LM3S_EVAL_BOARD_PID 0xbcd9
|
||||
#define LMI_LM3S_ICDI_BOARD_PID 0xbcda
|
||||
|
||||
#define FTDI_TURTELIZER_PID 0xBDC8 /* JTAG/RS-232 adapter by egnite GmBH */
|
||||
|
||||
@@ -110,6 +118,7 @@
|
||||
|
||||
/* Propox devices */
|
||||
#define FTDI_PROPOX_JTAGCABLEII_PID 0xD738
|
||||
#define FTDI_PROPOX_ISPCABLEIII_PID 0xD739
|
||||
|
||||
/* Lenz LI-USB Computer Interface. */
|
||||
#define FTDI_LENZ_LIUSB_PID 0xD780
|
||||
@@ -419,9 +428,11 @@
|
||||
#define PROTEGO_SPECIAL_4 0xFC73 /* special/unknown device */
|
||||
|
||||
/*
|
||||
* DSS-20 Sync Station for Sony Ericsson P800
|
||||
* Sony Ericsson product ids
|
||||
*/
|
||||
#define FTDI_DSS20_PID 0xFC82
|
||||
#define FTDI_DSS20_PID 0xFC82 /* DSS-20 Sync Station for Sony Ericsson P800 */
|
||||
#define FTDI_URBAN_0_PID 0xFC8A /* Sony Ericsson Urban, uart #0 */
|
||||
#define FTDI_URBAN_1_PID 0xFC8B /* Sony Ericsson Urban, uart #1 */
|
||||
|
||||
/* www.irtrans.de device */
|
||||
#define FTDI_IRTRANS_PID 0xFC60 /* Product Id */
|
||||
@@ -519,6 +530,12 @@
|
||||
#define ADI_GNICE_PID 0xF000
|
||||
#define ADI_GNICEPLUS_PID 0xF001
|
||||
|
||||
/*
|
||||
* Hornby Elite
|
||||
*/
|
||||
#define HORNBY_VID 0x04D8
|
||||
#define HORNBY_ELITE_PID 0x000A
|
||||
|
||||
/*
|
||||
* RATOC REX-USB60F
|
||||
*/
|
||||
@@ -1164,4 +1181,21 @@
|
||||
/* USB-Nano-485*/
|
||||
#define FTDI_CTI_NANO_PID 0xF60B
|
||||
|
||||
/*
|
||||
* ZeitControl cardsystems GmbH rfid-readers http://zeitconrol.de
|
||||
*/
|
||||
/* TagTracer MIFARE*/
|
||||
#define FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID 0xF7C0
|
||||
|
||||
/*
|
||||
* Rainforest Automation
|
||||
*/
|
||||
/* ZigBee controller */
|
||||
#define FTDI_RF_R106 0x8A28
|
||||
|
||||
/*
|
||||
* Product: HCP HIT GPRS modem
|
||||
* Manufacturer: HCP d.o.o.
|
||||
* ATI command output: Cinterion MC55i
|
||||
*/
|
||||
#define FTDI_CINTERION_MC55I_PID 0xA951
|
||||
|
@@ -974,10 +974,7 @@ static void garmin_close(struct usb_serial_port *port)
|
||||
if (!serial)
|
||||
return;
|
||||
|
||||
mutex_lock(&port->serial->disc_mutex);
|
||||
|
||||
if (!port->serial->disconnected)
|
||||
garmin_clear(garmin_data_p);
|
||||
garmin_clear(garmin_data_p);
|
||||
|
||||
/* shutdown our urbs */
|
||||
usb_kill_urb(port->read_urb);
|
||||
@@ -986,8 +983,6 @@ static void garmin_close(struct usb_serial_port *port)
|
||||
/* keep reset state so we know that we must start a new session */
|
||||
if (garmin_data_p->state != STATE_RESET)
|
||||
garmin_data_p->state = STATE_DISCONNECTED;
|
||||
|
||||
mutex_unlock(&port->serial->disc_mutex);
|
||||
}
|
||||
|
||||
|
||||
|
@@ -574,6 +574,9 @@ static void chase_port(struct edgeport_port *port, unsigned long timeout,
|
||||
wait_queue_t wait;
|
||||
unsigned long flags;
|
||||
|
||||
if (!tty)
|
||||
return;
|
||||
|
||||
if (!timeout)
|
||||
timeout = (HZ * EDGE_CLOSING_WAIT)/100;
|
||||
|
||||
@@ -2664,15 +2667,7 @@ cleanup:
|
||||
|
||||
static void edge_disconnect(struct usb_serial *serial)
|
||||
{
|
||||
int i;
|
||||
struct edgeport_port *edge_port;
|
||||
|
||||
dbg("%s", __func__);
|
||||
|
||||
for (i = 0; i < serial->num_ports; ++i) {
|
||||
edge_port = usb_get_serial_port_data(serial->port[i]);
|
||||
edge_remove_sysfs_attrs(edge_port->port);
|
||||
}
|
||||
}
|
||||
|
||||
static void edge_release(struct usb_serial *serial)
|
||||
@@ -2927,6 +2922,7 @@ static struct usb_serial_driver edgeport_1port_device = {
|
||||
.disconnect = edge_disconnect,
|
||||
.release = edge_release,
|
||||
.port_probe = edge_create_sysfs_attrs,
|
||||
.port_remove = edge_remove_sysfs_attrs,
|
||||
.ioctl = edge_ioctl,
|
||||
.set_termios = edge_set_termios,
|
||||
.tiocmget = edge_tiocmget,
|
||||
@@ -2957,6 +2953,7 @@ static struct usb_serial_driver edgeport_2port_device = {
|
||||
.disconnect = edge_disconnect,
|
||||
.release = edge_release,
|
||||
.port_probe = edge_create_sysfs_attrs,
|
||||
.port_remove = edge_remove_sysfs_attrs,
|
||||
.ioctl = edge_ioctl,
|
||||
.set_termios = edge_set_termios,
|
||||
.tiocmget = edge_tiocmget,
|
||||
|
@@ -1181,9 +1181,12 @@ static int mos7840_chars_in_buffer(struct tty_struct *tty)
|
||||
}
|
||||
|
||||
spin_lock_irqsave(&mos7840_port->pool_lock, flags);
|
||||
for (i = 0; i < NUM_URBS; ++i)
|
||||
if (mos7840_port->busy[i])
|
||||
chars += URB_TRANSFER_BUFFER_SIZE;
|
||||
for (i = 0; i < NUM_URBS; ++i) {
|
||||
if (mos7840_port->busy[i]) {
|
||||
struct urb *urb = mos7840_port->write_urb_pool[i];
|
||||
chars += urb->transfer_buffer_length;
|
||||
}
|
||||
}
|
||||
spin_unlock_irqrestore(&mos7840_port->pool_lock, flags);
|
||||
dbg("%s - returns %d", __func__, chars);
|
||||
return chars;
|
||||
@@ -2566,7 +2569,6 @@ error:
|
||||
kfree(mos7840_port->ctrl_buf);
|
||||
usb_free_urb(mos7840_port->control_urb);
|
||||
kfree(mos7840_port);
|
||||
serial->port[i] = NULL;
|
||||
}
|
||||
return status;
|
||||
}
|
||||
@@ -2633,6 +2635,7 @@ static void mos7840_release(struct usb_serial *serial)
|
||||
mos7840_port = mos7840_get_port_private(serial->port[i]);
|
||||
dbg("mos7840_port %d = %p", i, mos7840_port);
|
||||
if (mos7840_port) {
|
||||
usb_free_urb(mos7840_port->control_urb);
|
||||
kfree(mos7840_port->ctrl_buf);
|
||||
kfree(mos7840_port->dr);
|
||||
kfree(mos7840_port);
|
||||
|
@@ -317,7 +317,7 @@ static int omninet_write_room(struct tty_struct *tty)
|
||||
int room = 0; /* Default: no room */
|
||||
|
||||
/* FIXME: no consistent locking for write_urb_busy */
|
||||
if (wport->write_urb_busy)
|
||||
if (!wport->write_urb_busy)
|
||||
room = wport->bulk_out_size - OMNINET_HEADERLEN;
|
||||
|
||||
dbg("%s - returns %d", __func__, room);
|
||||
|
@@ -618,6 +618,7 @@ static const struct usb_device_id option_ids[] = {
|
||||
{ USB_DEVICE(KYOCERA_VENDOR_ID, KYOCERA_PRODUCT_KPC680) },
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6000)}, /* ZTE AC8700 */
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x6613)}, /* Onda H600/ZTE MF330 */
|
||||
{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000)}, /* SIMCom SIM5218 */
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6280) }, /* BP3-USB & BP3-EXT HSDPA */
|
||||
{ USB_DEVICE(CMOTECH_VENDOR_ID, CMOTECH_PRODUCT_6008) },
|
||||
{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UC864E) },
|
||||
|
@@ -100,6 +100,8 @@ static struct usb_device_id id_table [] = {
|
||||
{ USB_DEVICE(ZEAGLE_VENDOR_ID, ZEAGLE_N2ITION3_PRODUCT_ID) },
|
||||
{ USB_DEVICE(SONY_VENDOR_ID, SONY_QN3USB_PRODUCT_ID) },
|
||||
{ USB_DEVICE(SANWA_VENDOR_ID, SANWA_PRODUCT_ID) },
|
||||
{ USB_DEVICE(ADLINK_VENDOR_ID, ADLINK_ND6530_PRODUCT_ID) },
|
||||
{ USB_DEVICE(SMART_VENDOR_ID, SMART_PRODUCT_ID) },
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
||||
@@ -615,10 +617,28 @@ static void pl2303_set_termios(struct tty_struct *tty,
|
||||
baud = 6000000;
|
||||
}
|
||||
dbg("%s - baud set = %d", __func__, baud);
|
||||
buf[0] = baud & 0xff;
|
||||
buf[1] = (baud >> 8) & 0xff;
|
||||
buf[2] = (baud >> 16) & 0xff;
|
||||
buf[3] = (baud >> 24) & 0xff;
|
||||
if (baud <= 115200) {
|
||||
buf[0] = baud & 0xff;
|
||||
buf[1] = (baud >> 8) & 0xff;
|
||||
buf[2] = (baud >> 16) & 0xff;
|
||||
buf[3] = (baud >> 24) & 0xff;
|
||||
} else {
|
||||
/* apparently the formula for higher speeds is:
|
||||
* baudrate = 12M * 32 / (2^buf[1]) / buf[0]
|
||||
*/
|
||||
unsigned tmp = 12*1000*1000*32 / baud;
|
||||
buf[3] = 0x80;
|
||||
buf[2] = 0;
|
||||
buf[1] = (tmp >= 256);
|
||||
while (tmp >= 256) {
|
||||
tmp >>= 2;
|
||||
buf[1] <<= 1;
|
||||
}
|
||||
if (tmp > 256) {
|
||||
tmp %= 256;
|
||||
}
|
||||
buf[0] = tmp;
|
||||
}
|
||||
}
|
||||
|
||||
/* For reference buf[4]=0 is 1 stop bits */
|
||||
|
@@ -5,7 +5,7 @@
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
#define BENQ_VENDOR_ID 0x04a5
|
||||
@@ -140,3 +140,12 @@
|
||||
/* Sanwa KB-USB2 multimeter cable (ID: 11ad:0001) */
|
||||
#define SANWA_VENDOR_ID 0x11ad
|
||||
#define SANWA_PRODUCT_ID 0x0001
|
||||
|
||||
/* ADLINK ND-6530 RS232,RS485 and RS422 adapter */
|
||||
#define ADLINK_VENDOR_ID 0x0b63
|
||||
#define ADLINK_ND6530_PRODUCT_ID 0x6530
|
||||
|
||||
/* SMART USB Serial Adapter */
|
||||
#define SMART_VENDOR_ID 0x0b8c
|
||||
#define SMART_PRODUCT_ID 0x2303
|
||||
|
||||
|
@@ -28,6 +28,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{USB_DEVICE(0x05c6, 0x9212)}, /* Acer Gobi Modem Device */
|
||||
{USB_DEVICE(0x03f0, 0x1f1d)}, /* HP un2400 Gobi Modem Device */
|
||||
{USB_DEVICE(0x03f0, 0x201d)}, /* HP un2400 Gobi QDL Device */
|
||||
{USB_DEVICE(0x03f0, 0x371d)}, /* HP un2430 Mobile Broadband Module */
|
||||
{USB_DEVICE(0x04da, 0x250d)}, /* Panasonic Gobi Modem device */
|
||||
{USB_DEVICE(0x04da, 0x250c)}, /* Panasonic Gobi QDL device */
|
||||
{USB_DEVICE(0x413c, 0x8172)}, /* Dell Gobi Modem device */
|
||||
@@ -45,6 +46,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{USB_DEVICE(0x05c6, 0x9203)}, /* Generic Gobi Modem device */
|
||||
{USB_DEVICE(0x05c6, 0x9222)}, /* Generic Gobi Modem device */
|
||||
{USB_DEVICE(0x05c6, 0x9008)}, /* Generic Gobi QDL device */
|
||||
{USB_DEVICE(0x05c6, 0x9009)}, /* Generic Gobi Modem device */
|
||||
{USB_DEVICE(0x05c6, 0x9201)}, /* Generic Gobi QDL device */
|
||||
{USB_DEVICE(0x05c6, 0x9221)}, /* Generic Gobi QDL device */
|
||||
{USB_DEVICE(0x05c6, 0x9231)}, /* Generic Gobi QDL device */
|
||||
@@ -78,6 +80,7 @@ static const struct usb_device_id id_table[] = {
|
||||
{USB_DEVICE(0x1199, 0x9008)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||
{USB_DEVICE(0x1199, 0x9009)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||
{USB_DEVICE(0x1199, 0x900a)}, /* Sierra Wireless Gobi 2000 Modem device (VT773) */
|
||||
{USB_DEVICE(0x1199, 0x9011)}, /* Sierra Wireless Gobi 2000 Modem device (MC8305) */
|
||||
{USB_DEVICE(0x16d8, 0x8001)}, /* CMDTech Gobi 2000 QDL device (VU922) */
|
||||
{USB_DEVICE(0x16d8, 0x8002)}, /* CMDTech Gobi 2000 Modem device (VU922) */
|
||||
{USB_DEVICE(0x05c6, 0x9204)}, /* Gobi 2000 QDL device */
|
||||
|
@@ -925,6 +925,7 @@ static void sierra_release(struct usb_serial *serial)
|
||||
continue;
|
||||
kfree(portdata);
|
||||
}
|
||||
kfree(serial->private);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
|
@@ -1071,6 +1071,12 @@ int usb_serial_probe(struct usb_interface *interface,
|
||||
serial->attached = 1;
|
||||
}
|
||||
|
||||
/* Avoid race with tty_open and serial_install by setting the
|
||||
* disconnected flag and not clearing it until all ports have been
|
||||
* registered.
|
||||
*/
|
||||
serial->disconnected = 1;
|
||||
|
||||
if (get_free_serial(serial, num_ports, &minor) == NULL) {
|
||||
dev_err(&interface->dev, "No more free serial devices\n");
|
||||
goto probe_error;
|
||||
@@ -1093,6 +1099,8 @@ int usb_serial_probe(struct usb_interface *interface,
|
||||
}
|
||||
}
|
||||
|
||||
serial->disconnected = 0;
|
||||
|
||||
usb_serial_console_init(debug, minor);
|
||||
|
||||
exit:
|
||||
|
@@ -576,6 +576,7 @@ no_firmware:
|
||||
"%s: please contact support@connecttech.com\n",
|
||||
serial->type->description);
|
||||
kfree(result);
|
||||
kfree(command);
|
||||
return -ENODEV;
|
||||
|
||||
no_command_private:
|
||||
|
Reference in New Issue
Block a user