diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-29 12:24:42 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-10-29 12:24:42 -0400 |
commit | 9c19db5b11487da704d29dee48345c4841831bac (patch) | |
tree | 4557f412f45bc45050e44a32752c927c4c6cce31 /drivers/usb | |
parent | 9680b60ed79edaf52f84b65cbb20859bbb26cb68 (diff) | |
parent | 7f2719f0003da1ad13124ef00f48d7514c79e30d (diff) |
Merge tag 'usb-serial-3.18-rc3' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes:
USB-serial fixes for v3.18-rc3
These updates remove two allocations of unused buffers from kobil_sct
and add some new device ids.
Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/cp210x.c | 1 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio.c | 3 | ||||
-rw-r--r-- | drivers/usb/serial/ftdi_sio_ids.h | 12 | ||||
-rw-r--r-- | drivers/usb/serial/kobil_sct.c | 15 | ||||
-rw-r--r-- | drivers/usb/serial/option.c | 10 |
5 files changed, 25 insertions, 16 deletions
diff --git a/drivers/usb/serial/cp210x.c b/drivers/usb/serial/cp210x.c index eca1747ca8c7..cfd009dc4018 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[] = { | |||
155 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ | 155 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ |
156 | { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ | 156 | { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ |
157 | { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */ | 157 | { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */ |
158 | { USB_DEVICE(0x1BA4, 0x0002) }, /* Silicon Labs 358x factory default */ | ||
158 | { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ | 159 | { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ |
159 | { USB_DEVICE(0x1D6F, 0x0010) }, /* Seluxit ApS RF Dongle */ | 160 | { USB_DEVICE(0x1D6F, 0x0010) }, /* Seluxit ApS RF Dongle */ |
160 | { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ | 161 | { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ |
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c index dc72b924c399..0dad8ce5a609 100644 --- a/drivers/usb/serial/ftdi_sio.c +++ b/drivers/usb/serial/ftdi_sio.c | |||
@@ -140,6 +140,7 @@ static struct ftdi_sio_quirk ftdi_8u2232c_quirk = { | |||
140 | * /sys/bus/usb-serial/drivers/ftdi_sio/new_id and send a patch or report. | 140 | * /sys/bus/usb-serial/drivers/ftdi_sio/new_id and send a patch or report. |
141 | */ | 141 | */ |
142 | static const struct usb_device_id id_table_combined[] = { | 142 | static const struct usb_device_id id_table_combined[] = { |
143 | { USB_DEVICE(FTDI_VID, FTDI_BRICK_PID) }, | ||
143 | { USB_DEVICE(FTDI_VID, FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID) }, | 144 | { USB_DEVICE(FTDI_VID, FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID) }, |
144 | { USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) }, | 145 | { USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) }, |
145 | { USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) }, | 146 | { USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) }, |
@@ -661,6 +662,8 @@ static const struct usb_device_id id_table_combined[] = { | |||
661 | { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_5_PID) }, | 662 | { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_5_PID) }, |
662 | { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_6_PID) }, | 663 | { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_6_PID) }, |
663 | { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_7_PID) }, | 664 | { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_7_PID) }, |
665 | { USB_DEVICE(XSENS_VID, XSENS_AWINDA_DONGLE_PID) }, | ||
666 | { USB_DEVICE(XSENS_VID, XSENS_AWINDA_STATION_PID) }, | ||
664 | { USB_DEVICE(XSENS_VID, XSENS_CONVERTER_PID) }, | 667 | { USB_DEVICE(XSENS_VID, XSENS_CONVERTER_PID) }, |
665 | { USB_DEVICE(XSENS_VID, XSENS_MTW_PID) }, | 668 | { USB_DEVICE(XSENS_VID, XSENS_MTW_PID) }, |
666 | { USB_DEVICE(FTDI_VID, FTDI_OMNI1509) }, | 669 | { USB_DEVICE(FTDI_VID, FTDI_OMNI1509) }, |
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h index 5937b2d242f2..6786b705ccf6 100644 --- a/drivers/usb/serial/ftdi_sio_ids.h +++ b/drivers/usb/serial/ftdi_sio_ids.h | |||
@@ -30,6 +30,12 @@ | |||
30 | 30 | ||
31 | /*** third-party PIDs (using FTDI_VID) ***/ | 31 | /*** third-party PIDs (using FTDI_VID) ***/ |
32 | 32 | ||
33 | /* | ||
34 | * Certain versions of the official Windows FTDI driver reprogrammed | ||
35 | * counterfeit FTDI devices to PID 0. Support these devices anyway. | ||
36 | */ | ||
37 | #define FTDI_BRICK_PID 0x0000 | ||
38 | |||
33 | #define FTDI_LUMEL_PD12_PID 0x6002 | 39 | #define FTDI_LUMEL_PD12_PID 0x6002 |
34 | 40 | ||
35 | /* | 41 | /* |
@@ -143,8 +149,12 @@ | |||
143 | * Xsens Technologies BV products (http://www.xsens.com). | 149 | * Xsens Technologies BV products (http://www.xsens.com). |
144 | */ | 150 | */ |
145 | #define XSENS_VID 0x2639 | 151 | #define XSENS_VID 0x2639 |
146 | #define XSENS_CONVERTER_PID 0xD00D /* Xsens USB-serial converter */ | 152 | #define XSENS_AWINDA_STATION_PID 0x0101 |
153 | #define XSENS_AWINDA_DONGLE_PID 0x0102 | ||
147 | #define XSENS_MTW_PID 0x0200 /* Xsens MTw */ | 154 | #define XSENS_MTW_PID 0x0200 /* Xsens MTw */ |
155 | #define XSENS_CONVERTER_PID 0xD00D /* Xsens USB-serial converter */ | ||
156 | |||
157 | /* Xsens devices using FTDI VID */ | ||
148 | #define XSENS_CONVERTER_0_PID 0xD388 /* Xsens USB converter */ | 158 | #define XSENS_CONVERTER_0_PID 0xD388 /* Xsens USB converter */ |
149 | #define XSENS_CONVERTER_1_PID 0xD389 /* Xsens Wireless Receiver */ | 159 | #define XSENS_CONVERTER_1_PID 0xD389 /* Xsens Wireless Receiver */ |
150 | #define XSENS_CONVERTER_2_PID 0xD38A | 160 | #define XSENS_CONVERTER_2_PID 0xD38A |
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index 078f9ed419c8..3d2bd65df0fc 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c | |||
@@ -414,8 +414,6 @@ static int kobil_tiocmset(struct tty_struct *tty, | |||
414 | int result; | 414 | int result; |
415 | int dtr = 0; | 415 | int dtr = 0; |
416 | int rts = 0; | 416 | int rts = 0; |
417 | unsigned char *transfer_buffer; | ||
418 | int transfer_buffer_length = 8; | ||
419 | 417 | ||
420 | /* FIXME: locking ? */ | 418 | /* FIXME: locking ? */ |
421 | priv = usb_get_serial_port_data(port); | 419 | priv = usb_get_serial_port_data(port); |
@@ -425,11 +423,6 @@ static int kobil_tiocmset(struct tty_struct *tty, | |||
425 | return -EINVAL; | 423 | return -EINVAL; |
426 | } | 424 | } |
427 | 425 | ||
428 | /* allocate memory for transfer buffer */ | ||
429 | transfer_buffer = kzalloc(transfer_buffer_length, GFP_KERNEL); | ||
430 | if (!transfer_buffer) | ||
431 | return -ENOMEM; | ||
432 | |||
433 | if (set & TIOCM_RTS) | 426 | if (set & TIOCM_RTS) |
434 | rts = 1; | 427 | rts = 1; |
435 | if (set & TIOCM_DTR) | 428 | if (set & TIOCM_DTR) |
@@ -469,7 +462,6 @@ static int kobil_tiocmset(struct tty_struct *tty, | |||
469 | KOBIL_TIMEOUT); | 462 | KOBIL_TIMEOUT); |
470 | } | 463 | } |
471 | dev_dbg(dev, "%s - Send set_status_line URB returns: %i\n", __func__, result); | 464 | dev_dbg(dev, "%s - Send set_status_line URB returns: %i\n", __func__, result); |
472 | kfree(transfer_buffer); | ||
473 | return (result < 0) ? result : 0; | 465 | return (result < 0) ? result : 0; |
474 | } | 466 | } |
475 | 467 | ||
@@ -530,8 +522,6 @@ static int kobil_ioctl(struct tty_struct *tty, | |||
530 | { | 522 | { |
531 | struct usb_serial_port *port = tty->driver_data; | 523 | struct usb_serial_port *port = tty->driver_data; |
532 | struct kobil_private *priv = usb_get_serial_port_data(port); | 524 | struct kobil_private *priv = usb_get_serial_port_data(port); |
533 | unsigned char *transfer_buffer; | ||
534 | int transfer_buffer_length = 8; | ||
535 | int result; | 525 | int result; |
536 | 526 | ||
537 | if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID || | 527 | if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID || |
@@ -541,10 +531,6 @@ static int kobil_ioctl(struct tty_struct *tty, | |||
541 | 531 | ||
542 | switch (cmd) { | 532 | switch (cmd) { |
543 | case TCFLSH: | 533 | case TCFLSH: |
544 | transfer_buffer = kmalloc(transfer_buffer_length, GFP_KERNEL); | ||
545 | if (!transfer_buffer) | ||
546 | return -ENOBUFS; | ||
547 | |||
548 | result = usb_control_msg(port->serial->dev, | 534 | result = usb_control_msg(port->serial->dev, |
549 | usb_sndctrlpipe(port->serial->dev, 0), | 535 | usb_sndctrlpipe(port->serial->dev, 0), |
550 | SUSBCRequest_Misc, | 536 | SUSBCRequest_Misc, |
@@ -559,7 +545,6 @@ static int kobil_ioctl(struct tty_struct *tty, | |||
559 | dev_dbg(&port->dev, | 545 | dev_dbg(&port->dev, |
560 | "%s - Send reset_all_queues (FLUSH) URB returns: %i\n", | 546 | "%s - Send reset_all_queues (FLUSH) URB returns: %i\n", |
561 | __func__, result); | 547 | __func__, result); |
562 | kfree(transfer_buffer); | ||
563 | return (result < 0) ? -EIO: 0; | 548 | return (result < 0) ? -EIO: 0; |
564 | default: | 549 | default: |
565 | return -ENOIOCTLCMD; | 550 | return -ENOIOCTLCMD; |
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c index d1a3f6044c8a..7a4c21b4f676 100644 --- a/drivers/usb/serial/option.c +++ b/drivers/usb/serial/option.c | |||
@@ -269,6 +269,7 @@ static void option_instat_callback(struct urb *urb); | |||
269 | #define TELIT_PRODUCT_DE910_DUAL 0x1010 | 269 | #define TELIT_PRODUCT_DE910_DUAL 0x1010 |
270 | #define TELIT_PRODUCT_UE910_V2 0x1012 | 270 | #define TELIT_PRODUCT_UE910_V2 0x1012 |
271 | #define TELIT_PRODUCT_LE920 0x1200 | 271 | #define TELIT_PRODUCT_LE920 0x1200 |
272 | #define TELIT_PRODUCT_LE910 0x1201 | ||
272 | 273 | ||
273 | /* ZTE PRODUCTS */ | 274 | /* ZTE PRODUCTS */ |
274 | #define ZTE_VENDOR_ID 0x19d2 | 275 | #define ZTE_VENDOR_ID 0x19d2 |
@@ -362,6 +363,7 @@ static void option_instat_callback(struct urb *urb); | |||
362 | 363 | ||
363 | /* Haier products */ | 364 | /* Haier products */ |
364 | #define HAIER_VENDOR_ID 0x201e | 365 | #define HAIER_VENDOR_ID 0x201e |
366 | #define HAIER_PRODUCT_CE81B 0x10f8 | ||
365 | #define HAIER_PRODUCT_CE100 0x2009 | 367 | #define HAIER_PRODUCT_CE100 0x2009 |
366 | 368 | ||
367 | /* Cinterion (formerly Siemens) products */ | 369 | /* Cinterion (formerly Siemens) products */ |
@@ -589,6 +591,11 @@ static const struct option_blacklist_info zte_1255_blacklist = { | |||
589 | .reserved = BIT(3) | BIT(4), | 591 | .reserved = BIT(3) | BIT(4), |
590 | }; | 592 | }; |
591 | 593 | ||
594 | static const struct option_blacklist_info telit_le910_blacklist = { | ||
595 | .sendsetup = BIT(0), | ||
596 | .reserved = BIT(1) | BIT(2), | ||
597 | }; | ||
598 | |||
592 | static const struct option_blacklist_info telit_le920_blacklist = { | 599 | static const struct option_blacklist_info telit_le920_blacklist = { |
593 | .sendsetup = BIT(0), | 600 | .sendsetup = BIT(0), |
594 | .reserved = BIT(1) | BIT(5), | 601 | .reserved = BIT(1) | BIT(5), |
@@ -1138,6 +1145,8 @@ static const struct usb_device_id option_ids[] = { | |||
1138 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) }, | 1145 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) }, |
1139 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) }, | 1146 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) }, |
1140 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UE910_V2) }, | 1147 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_UE910_V2) }, |
1148 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE910), | ||
1149 | .driver_info = (kernel_ulong_t)&telit_le910_blacklist }, | ||
1141 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920), | 1150 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920), |
1142 | .driver_info = (kernel_ulong_t)&telit_le920_blacklist }, | 1151 | .driver_info = (kernel_ulong_t)&telit_le920_blacklist }, |
1143 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */ | 1152 | { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */ |
@@ -1621,6 +1630,7 @@ static const struct usb_device_id option_ids[] = { | |||
1621 | { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) }, | 1630 | { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) }, |
1622 | { USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) }, | 1631 | { USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) }, |
1623 | { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) }, | 1632 | { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) }, |
1633 | { USB_DEVICE_AND_INTERFACE_INFO(HAIER_VENDOR_ID, HAIER_PRODUCT_CE81B, 0xff, 0xff, 0xff) }, | ||
1624 | /* Pirelli */ | 1634 | /* Pirelli */ |
1625 | { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1, 0xff) }, | 1635 | { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1, 0xff) }, |
1626 | { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_2, 0xff) }, | 1636 | { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_2, 0xff) }, |