diff options
Diffstat (limited to 'drivers/usb/serial')
| -rw-r--r-- | drivers/usb/serial/bus.c | 4 | ||||
| -rw-r--r-- | drivers/usb/serial/cp210x.c | 5 | ||||
| -rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 1 | ||||
| -rw-r--r-- | drivers/usb/serial/ftdi_sio_ids.h | 3 | ||||
| -rw-r--r-- | drivers/usb/serial/option.c | 7 | ||||
| -rw-r--r-- | drivers/usb/serial/pl2303.c | 42 | ||||
| -rw-r--r-- | drivers/usb/serial/usb-serial.c | 13 | 
7 files changed, 47 insertions, 28 deletions
diff --git a/drivers/usb/serial/bus.c b/drivers/usb/serial/bus.c index 7133818a58b9..9e38142acd38 100644 --- a/drivers/usb/serial/bus.c +++ b/drivers/usb/serial/bus.c @@ -74,7 +74,7 @@ err_autopm_put:  	return retval;  } -static int usb_serial_device_remove(struct device *dev) +static void usb_serial_device_remove(struct device *dev)  {  	struct usb_serial_port *port = to_usb_serial_port(dev);  	struct usb_serial_driver *driver; @@ -101,8 +101,6 @@ static int usb_serial_device_remove(struct device *dev)  	if (!autopm_err)  		usb_autopm_put_interface(port->serial->interface); - -	return 0;  }  static ssize_t new_id_store(struct device_driver *driver, diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index 09b845d0da41..3c80bfbf3bec 100644 --- a/drivers/usb/serial/cp210x.c +++ b/drivers/usb/serial/cp210x.c @@ -155,6 +155,7 @@ static const struct usb_device_id id_table[] = {  	{ USB_DEVICE(0x10C4, 0x89A4) }, /* CESINEL FTBC Flexible Thyristor Bridge Controller */  	{ USB_DEVICE(0x10C4, 0x89FB) }, /* Qivicon ZigBee USB Radio Stick */  	{ USB_DEVICE(0x10C4, 0x8A2A) }, /* HubZ dual ZigBee and Z-Wave dongle */ +	{ USB_DEVICE(0x10C4, 0x8A5B) }, /* CEL EM3588 ZigBee USB Stick */  	{ USB_DEVICE(0x10C4, 0x8A5E) }, /* CEL EM3588 ZigBee USB Stick Long Range */  	{ USB_DEVICE(0x10C4, 0x8B34) }, /* Qivicon ZigBee USB Radio Stick */  	{ USB_DEVICE(0x10C4, 0xEA60) }, /* Silicon Labs factory default */ @@ -202,8 +203,8 @@ static const struct usb_device_id id_table[] = {  	{ USB_DEVICE(0x1901, 0x0194) },	/* GE Healthcare Remote Alarm Box */  	{ USB_DEVICE(0x1901, 0x0195) },	/* GE B850/B650/B450 CP2104 DP UART interface */  	{ USB_DEVICE(0x1901, 0x0196) },	/* GE B850 CP2105 DP UART interface */ -	{ USB_DEVICE(0x1901, 0x0197) }, /* GE CS1000 Display serial interface */ -	{ USB_DEVICE(0x1901, 0x0198) }, /* GE CS1000 M.2 Key E serial interface */ +	{ USB_DEVICE(0x1901, 0x0197) }, /* GE CS1000 M.2 Key E serial interface */ +	{ USB_DEVICE(0x1901, 0x0198) }, /* GE CS1000 Display serial interface */  	{ USB_DEVICE(0x199B, 0xBA30) }, /* LORD WSDA-200-USB */  	{ USB_DEVICE(0x19CF, 0x3000) }, /* Parrot NMEA GPS Flight Recorder */  	{ USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index 4a1f3a95d017..33bbb3470ca3 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c @@ -219,6 +219,7 @@ static const struct usb_device_id id_table_combined[] = {  	{ USB_DEVICE(FTDI_VID, FTDI_MTXORB_6_PID) },  	{ USB_DEVICE(FTDI_VID, FTDI_R2000KU_TRUE_RNG) },  	{ USB_DEVICE(FTDI_VID, FTDI_VARDAAN_PID) }, +	{ USB_DEVICE(FTDI_VID, FTDI_AUTO_M3_OP_COM_V2_PID) },  	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0100_PID) },  	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0101_PID) },  	{ USB_DEVICE(MTXORB_VID, MTXORB_FTDI_RANGE_0102_PID) }, diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index add602bebd82..755858ca20ba 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h @@ -159,6 +159,9 @@  /* Vardaan Enterprises Serial Interface VEUSB422R3 */  #define FTDI_VARDAAN_PID	0xF070 +/* Auto-M3 Ltd. - OP-COM USB V2 - OBD interface Adapter */ +#define FTDI_AUTO_M3_OP_COM_V2_PID	0x4f50 +  /*   * Xsens Technologies BV products (http://www.xsens.com).   */ diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index 7608584ef4fe..29c765cc8495 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c @@ -238,6 +238,7 @@ static void option_instat_callback(struct urb *urb);  #define QUECTEL_PRODUCT_UC15			0x9090  /* These u-blox products use Qualcomm's vendor ID */  #define UBLOX_PRODUCT_R410M			0x90b2 +#define UBLOX_PRODUCT_R6XX			0x90fa  /* These Yuga products use Qualcomm's vendor ID */  #define YUGA_PRODUCT_CLM920_NC5			0x9625 @@ -1101,6 +1102,8 @@ static const struct usb_device_id option_ids[] = {  	/* u-blox products using Qualcomm vendor ID */  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R410M),  	  .driver_info = RSVD(1) | RSVD(3) }, +	{ USB_DEVICE(QUALCOMM_VENDOR_ID, UBLOX_PRODUCT_R6XX), +	  .driver_info = RSVD(3) },  	/* Quectel products using Quectel vendor ID */  	{ USB_DEVICE_AND_INTERFACE_INFO(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_EC21, 0xff, 0xff, 0xff),  	  .driver_info = NUMEP2 }, @@ -1200,6 +1203,8 @@ static const struct usb_device_id option_ids[] = {  	  .driver_info = NCTRL(2) | RSVD(3) },  	{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1055, 0xff),	/* Telit FN980 (PCIe) */  	  .driver_info = NCTRL(0) | RSVD(1) }, +	{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1056, 0xff),	/* Telit FD980 */ +	  .driver_info = NCTRL(2) | RSVD(3) },  	{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910),  	  .driver_info = NCTRL(0) | RSVD(1) | RSVD(3) },  	{ USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_ME910_DUAL_MODEM), @@ -2069,6 +2074,8 @@ static const struct usb_device_id option_ids[] = {  	  .driver_info = RSVD(4) | RSVD(5) },  	{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x0105, 0xff),			/* Fibocom NL678 series */  	  .driver_info = RSVD(6) }, +	{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0xff, 0x30) },	/* Fibocom FG150 Diag */ +	{ USB_DEVICE_AND_INTERFACE_INFO(0x2cb7, 0x010b, 0xff, 0, 0) },		/* Fibocom FG150 AT */  	{ USB_DEVICE_INTERFACE_CLASS(0x2cb7, 0x01a0, 0xff) },			/* Fibocom NL668-AM/NL652-EU (laptop MBIM) */  	{ USB_DEVICE_INTERFACE_CLASS(0x2df3, 0x9d03, 0xff) },			/* LongSung M5710 */  	{ USB_DEVICE_INTERFACE_CLASS(0x305a, 0x1404, 0xff) },			/* GosunCn GM500 RNDIS */ diff --git a/drivers/usb/serial/pl2303.c b/drivers/usb/serial/pl2303.c index 2f2f5047452b..930b3d50a330 100644 --- a/drivers/usb/serial/pl2303.c +++ b/drivers/usb/serial/pl2303.c @@ -418,24 +418,34 @@ static int pl2303_detect_type(struct usb_serial *serial)  	bcdDevice = le16_to_cpu(desc->bcdDevice);  	bcdUSB = le16_to_cpu(desc->bcdUSB); -	switch (bcdDevice) { -	case 0x100: -		/* -		 * Assume it's an HXN-type if the device doesn't support the old read -		 * request value. -		 */ -		if (bcdUSB == 0x200 && !pl2303_supports_hx_status(serial)) -			return TYPE_HXN; +	switch (bcdUSB) { +	case 0x110: +		switch (bcdDevice) { +		case 0x300: +			return TYPE_HX; +		case 0x400: +			return TYPE_HXD; +		default: +			return TYPE_HX; +		}  		break; -	case 0x300: -		if (bcdUSB == 0x200) +	case 0x200: +		switch (bcdDevice) { +		case 0x100: +		case 0x305: +			/* +			 * Assume it's an HXN-type if the device doesn't +			 * support the old read request value. +			 */ +			if (!pl2303_supports_hx_status(serial)) +				return TYPE_HXN; +			break; +		case 0x300:  			return TYPE_TA; - -		return TYPE_HX; -	case 0x400: -		return TYPE_HXD; -	case 0x500: -		return TYPE_TB; +		case 0x500: +			return TYPE_TB; +		} +		break;  	}  	dev_err(&serial->interface->dev, diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c index eeb441c77207..090a78c948f2 100644 --- a/drivers/usb/serial/usb-serial.c +++ b/drivers/usb/serial/usb-serial.c @@ -1319,9 +1319,10 @@ static int __init usb_serial_init(void)  {  	int result; -	usb_serial_tty_driver = alloc_tty_driver(USB_SERIAL_TTY_MINORS); -	if (!usb_serial_tty_driver) -		return -ENOMEM; +	usb_serial_tty_driver = tty_alloc_driver(USB_SERIAL_TTY_MINORS, +			TTY_DRIVER_REAL_RAW | TTY_DRIVER_DYNAMIC_DEV); +	if (IS_ERR(usb_serial_tty_driver)) +		return PTR_ERR(usb_serial_tty_driver);  	/* Initialize our global data */  	result = bus_register(&usb_serial_bus_type); @@ -1336,8 +1337,6 @@ static int __init usb_serial_init(void)  	usb_serial_tty_driver->minor_start = 0;  	usb_serial_tty_driver->type = TTY_DRIVER_TYPE_SERIAL;  	usb_serial_tty_driver->subtype = SERIAL_TYPE_NORMAL; -	usb_serial_tty_driver->flags = TTY_DRIVER_REAL_RAW | -						TTY_DRIVER_DYNAMIC_DEV;  	usb_serial_tty_driver->init_termios = tty_std_termios;  	usb_serial_tty_driver->init_termios.c_cflag = B9600 | CS8 | CREAD  							| HUPCL | CLOCAL; @@ -1367,7 +1366,7 @@ exit_reg_driver:  exit_bus:  	pr_err("%s - returning with error %d\n", __func__, result); -	put_tty_driver(usb_serial_tty_driver); +	tty_driver_kref_put(usb_serial_tty_driver);  	return result;  } @@ -1379,7 +1378,7 @@ static void __exit usb_serial_exit(void)  	usb_serial_generic_deregister();  	tty_unregister_driver(usb_serial_tty_driver); -	put_tty_driver(usb_serial_tty_driver); +	tty_driver_kref_put(usb_serial_tty_driver);  	bus_unregister(&usb_serial_bus_type);  	idr_destroy(&serial_minors);  }  | 
