mirror of
https://github.com/torvalds/linux.git
synced 2024-09-23 00:13:17 +00:00
USB-serial fixes for v4.14-rc5
Here's a fix for a cp210x regression that prevented a class of devices from being successfully probed. Two use-after-free bugs in the console code are also fixed. Included are also some new device ids. All but the last three commits have been in linux-next with no reported issues. -----BEGIN PGP SIGNATURE----- iQJFBAABCAAvFiEEHszNKQClByu0A+9RQQ3kT97htJUFAlnbUXsRHGpvaGFuQGtl cm5lbC5vcmcACgkQQQ3kT97htJVXLg/+JHYT8hpPWITTDYviItiOp6lMTJwdQT6Q zD7NPChJGJvuuKBSZ/SnDToMYnMixErKbguQmYEsFj/8JQl/oLO6aTnK5r+aFQ4P k2YoIGSJoNYdW2695Myd8YrJAVmWxfJXVqjDPnfKRHkLb8huZ6WYJxg9x7maBssQ CITxDCjfXFvzwfzIaJYjvS9a7yOQDruW2KLS0zfmnazdG8UG4qyJoucbbLhsTT3y a1LDDufFGjwzk/Ve7l+T5BeOGBwRSpI51DWOaktXxdlf+aCflsLm4YK4zf/881cF VPLHmuBo4l6/lQSMMhgnz88e1XvUu8KJPZAx1WeBAW1Liv3puSSi+VnnBBD7R56w QihnaRFwPfTQZR2Hn97YFqU7gK8UZN7kq3g77k7DWxS+q8+hr0cUcywk8Tbygsq3 SqMrmY/NLJilKsYRAFkmplGy+CSw7pfUjbvN8krDbPeC+3FoPkmfW1Jxm5pwT9j5 WR1RAuBfmyaJf28/KUiNfUiiExSe7oezLB4BtLZHVf54FFWXkj1ruJgEi4/I8vYX wiqaHMp2iyx9UAO8p1OvdXFMbr6RujRR7ujOrdxR6hcxt0PlsBWpFxLFiIf8VsJJ WgpVpZPZGmadE6ZK9oTpEqBiTFTol9dAsrvwwihdiLo9KOvdLzJXqLO9YshpJjMR 367/fkXynrA= =GjJU -----END PGP SIGNATURE----- Merge tag 'usb-serial-4.14-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus Johan writes: USB-serial fixes for v4.14-rc5 Here's a fix for a cp210x regression that prevented a class of devices from being successfully probed. Two use-after-free bugs in the console code are also fixed. Included are also some new device ids. All but the last three commits have been in linux-next with no reported issues.
This commit is contained in:
commit
47a4b71c0b
|
@ -186,6 +186,7 @@ static int usb_console_setup(struct console *co, char *options)
|
|||
tty_kref_put(tty);
|
||||
reset_open_count:
|
||||
port->port.count = 0;
|
||||
info->port = NULL;
|
||||
usb_autopm_put_interface(serial->interface);
|
||||
error_get_interface:
|
||||
usb_serial_put(serial);
|
||||
|
@ -265,7 +266,7 @@ static struct console usbcons = {
|
|||
|
||||
void usb_serial_console_disconnect(struct usb_serial *serial)
|
||||
{
|
||||
if (serial->port[0] == usbcons_info.port) {
|
||||
if (serial->port[0] && serial->port[0] == usbcons_info.port) {
|
||||
usb_serial_console_exit();
|
||||
usb_serial_put(serial);
|
||||
}
|
||||
|
|
|
@ -177,6 +177,7 @@ static const struct usb_device_id id_table[] = {
|
|||
{ USB_DEVICE(0x1843, 0x0200) }, /* Vaisala USB Instrument Cable */
|
||||
{ USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
|
||||
{ USB_DEVICE(0x18EF, 0xE025) }, /* ELV Marble Sound Board 1 */
|
||||
{ USB_DEVICE(0x18EF, 0xE032) }, /* ELV TFD500 Data Logger */
|
||||
{ USB_DEVICE(0x1901, 0x0190) }, /* GE B850 CP2105 Recorder interface */
|
||||
{ USB_DEVICE(0x1901, 0x0193) }, /* GE B650 CP2104 PMC interface */
|
||||
{ USB_DEVICE(0x1901, 0x0194) }, /* GE Healthcare Remote Alarm Box */
|
||||
|
@ -352,6 +353,7 @@ static struct usb_serial_driver * const serial_drivers[] = {
|
|||
#define CP210X_PARTNUM_CP2104 0x04
|
||||
#define CP210X_PARTNUM_CP2105 0x05
|
||||
#define CP210X_PARTNUM_CP2108 0x08
|
||||
#define CP210X_PARTNUM_UNKNOWN 0xFF
|
||||
|
||||
/* CP210X_GET_COMM_STATUS returns these 0x13 bytes */
|
||||
struct cp210x_comm_status {
|
||||
|
@ -1491,8 +1493,11 @@ static int cp210x_attach(struct usb_serial *serial)
|
|||
result = cp210x_read_vendor_block(serial, REQTYPE_DEVICE_TO_HOST,
|
||||
CP210X_GET_PARTNUM, &priv->partnum,
|
||||
sizeof(priv->partnum));
|
||||
if (result < 0)
|
||||
goto err_free_priv;
|
||||
if (result < 0) {
|
||||
dev_warn(&serial->interface->dev,
|
||||
"querying part number failed\n");
|
||||
priv->partnum = CP210X_PARTNUM_UNKNOWN;
|
||||
}
|
||||
|
||||
usb_set_serial_data(serial, priv);
|
||||
|
||||
|
@ -1505,10 +1510,6 @@ static int cp210x_attach(struct usb_serial *serial)
|
|||
}
|
||||
|
||||
return 0;
|
||||
err_free_priv:
|
||||
kfree(priv);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
static void cp210x_disconnect(struct usb_serial *serial)
|
||||
|
|
|
@ -1015,6 +1015,8 @@ static const struct usb_device_id id_table_combined[] = {
|
|||
{ USB_DEVICE(WICED_VID, WICED_USB20706V2_PID) },
|
||||
{ USB_DEVICE(TI_VID, TI_CC3200_LAUNCHPAD_PID),
|
||||
.driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
|
||||
{ USB_DEVICE(CYPRESS_VID, CYPRESS_WICED_BT_USB_PID) },
|
||||
{ USB_DEVICE(CYPRESS_VID, CYPRESS_WICED_WL_USB_PID) },
|
||||
{ } /* Terminating entry */
|
||||
};
|
||||
|
||||
|
|
|
@ -609,6 +609,13 @@
|
|||
#define ADI_GNICE_PID 0xF000
|
||||
#define ADI_GNICEPLUS_PID 0xF001
|
||||
|
||||
/*
|
||||
* Cypress WICED USB UART
|
||||
*/
|
||||
#define CYPRESS_VID 0x04B4
|
||||
#define CYPRESS_WICED_BT_USB_PID 0x009B
|
||||
#define CYPRESS_WICED_WL_USB_PID 0xF900
|
||||
|
||||
/*
|
||||
* Microchip Technology, Inc.
|
||||
*
|
||||
|
|
|
@ -522,6 +522,7 @@ static void option_instat_callback(struct urb *urb);
|
|||
|
||||
/* TP-LINK Incorporated products */
|
||||
#define TPLINK_VENDOR_ID 0x2357
|
||||
#define TPLINK_PRODUCT_LTE 0x000D
|
||||
#define TPLINK_PRODUCT_MA180 0x0201
|
||||
|
||||
/* Changhong products */
|
||||
|
@ -2011,6 +2012,7 @@ static const struct usb_device_id option_ids[] = {
|
|||
{ USB_DEVICE(CELLIENT_VENDOR_ID, CELLIENT_PRODUCT_MEN200) },
|
||||
{ USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600A) },
|
||||
{ USB_DEVICE(PETATEL_VENDOR_ID, PETATEL_PRODUCT_NP10T_600E) },
|
||||
{ USB_DEVICE_AND_INTERFACE_INFO(TPLINK_VENDOR_ID, TPLINK_PRODUCT_LTE, 0xff, 0x00, 0x00) }, /* TP-Link LTE Module */
|
||||
{ USB_DEVICE(TPLINK_VENDOR_ID, TPLINK_PRODUCT_MA180),
|
||||
.driver_info = (kernel_ulong_t)&net_intf4_blacklist },
|
||||
{ USB_DEVICE(TPLINK_VENDOR_ID, 0x9000), /* TP-Link MA260 */
|
||||
|
|
|
@ -174,6 +174,10 @@ static const struct usb_device_id id_table[] = {
|
|||
{DEVICE_SWI(0x413c, 0x81b3)}, /* Dell Wireless 5809e Gobi(TM) 4G LTE Mobile Broadband Card (rev3) */
|
||||
{DEVICE_SWI(0x413c, 0x81b5)}, /* Dell Wireless 5811e QDL */
|
||||
{DEVICE_SWI(0x413c, 0x81b6)}, /* Dell Wireless 5811e QDL */
|
||||
{DEVICE_SWI(0x413c, 0x81cf)}, /* Dell Wireless 5819 */
|
||||
{DEVICE_SWI(0x413c, 0x81d0)}, /* Dell Wireless 5819 */
|
||||
{DEVICE_SWI(0x413c, 0x81d1)}, /* Dell Wireless 5818 */
|
||||
{DEVICE_SWI(0x413c, 0x81d2)}, /* Dell Wireless 5818 */
|
||||
|
||||
/* Huawei devices */
|
||||
{DEVICE_HWI(0x03f0, 0x581d)}, /* HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) */
|
||||
|
|
Loading…
Reference in New Issue
Block a user