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.
Unified · Split
| @@ -155,6 +155,7 @@ static const struct usb_device_id id_table[] = { · 154 unmodified lines | ||
| 155 | 155 | { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */ |
| 156 | 156 | { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */ |
| 157 | 157 | { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */ |
| 158 | + { USB_DEVICE(0x1BA4, 0x0002) }, /* Silicon Labs 358x factory default */ | |
| 158 | 159 | { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */ |
| 159 | 160 | { USB_DEVICE(0x1D6F, 0x0010) }, /* Seluxit ApS RF Dongle */ |
| 160 | 161 | { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */ |
| @@ -140,6 +140,7 @@ static struct ftdi_sio_quirk ftdi_8u2232c_quirk = { · 139 unmodified lines | ||
| 140 | 140 | * /sys/bus/usb-serial/drivers/ftdi_sio/new_id and send a patch or report. |
| 141 | 141 | */ |
| 142 | 142 | static const struct usb_device_id id_table_combined[] = { |
| 143 | + { USB_DEVICE(FTDI_VID, FTDI_BRICK_PID) }, | |
| 143 | 144 | { USB_DEVICE(FTDI_VID, FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID) }, |
| 144 | 145 | { USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) }, |
| 145 | 146 | { USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) }, |
| @@ -661,6 +662,8 @@ static const struct usb_device_id id_table_combined[] = { · 515 unmodified lines | ||
| 661 | 662 | { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_5_PID) }, |
| 662 | 663 | { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_6_PID) }, |
| 663 | 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 | 667 | { USB_DEVICE(XSENS_VID, XSENS_CONVERTER_PID) }, |
| 665 | 668 | { USB_DEVICE(XSENS_VID, XSENS_MTW_PID) }, |
| 666 | 669 | { USB_DEVICE(FTDI_VID, FTDI_OMNI1509) }, |
| @@ -30,6 +30,12 @@ · 29 unmodified lines | ||
| 30 | 30 | |
| 31 | 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 | 39 | #define FTDI_LUMEL_PD12_PID 0x6002 |
| 34 | 40 | |
| 35 | 41 | /* |
| @@ -143,8 +149,12 @@ · 107 unmodified lines | ||
| 143 | 149 | * Xsens Technologies BV products (http://www.xsens.com). |
| 144 | 150 | */ |
| 145 | 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 | 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 | 158 | #define XSENS_CONVERTER_0_PID 0xD388 /* Xsens USB converter */ |
| 149 | 159 | #define XSENS_CONVERTER_1_PID 0xD389 /* Xsens Wireless Receiver */ |
| 150 | 160 | #define XSENS_CONVERTER_2_PID 0xD38A |
| @@ -414,8 +414,6 @@ static int kobil_tiocmset(struct tty_struct *tty, · 413 unmodified lines | ||
| 414 | 414 | int result; |
| 415 | 415 | int dtr = 0; |
| 416 | 416 | int rts = 0; |
| 417 | − unsigned char *transfer_buffer; | |
| 418 | − int transfer_buffer_length = 8; | |
| 419 | 417 | |
| 420 | 418 | /* FIXME: locking ? */ |
| 421 | 419 | priv = usb_get_serial_port_data(port); |
| @@ -425,11 +423,6 @@ static int kobil_tiocmset(struct tty_struct *tty, · 3 unmodified lines | ||
| 425 | 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 | 426 | if (set & TIOCM_RTS) |
| 434 | 427 | rts = 1; |
| 435 | 428 | if (set & TIOCM_DTR) |
| @@ -469,7 +462,6 @@ static int kobil_tiocmset(struct tty_struct *tty, · 33 unmodified lines | ||
| 469 | 462 | KOBIL_TIMEOUT); |
| 470 | 463 | } |
| 471 | 464 | dev_dbg(dev, "%s - Send set_status_line URB returns: %i\n", __func__, result); |
| 472 | − kfree(transfer_buffer); | |
| 473 | 465 | return (result < 0) ? result : 0; |
| 474 | 466 | } |
| 475 | 467 | |
| @@ -530,8 +522,6 @@ static int kobil_ioctl(struct tty_struct *tty, · 54 unmodified lines | ||
| 530 | 522 | { |
| 531 | 523 | struct usb_serial_port *port = tty->driver_data; |
| 532 | 524 | struct kobil_private *priv = usb_get_serial_port_data(port); |
| 533 | − unsigned char *transfer_buffer; | |
| 534 | − int transfer_buffer_length = 8; | |
| 535 | 525 | int result; |
| 536 | 526 | |
| 537 | 527 | if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID || |
| @@ -541,10 +531,6 @@ static int kobil_ioctl(struct tty_struct *tty, · 3 unmodified lines | ||
| 541 | 531 | |
| 542 | 532 | switch (cmd) { |
| 543 | 533 | case TCFLSH: |
| 544 | − transfer_buffer = kmalloc(transfer_buffer_length, GFP_KERNEL); | |
| 545 | − if (!transfer_buffer) | |
| 546 | − return -ENOBUFS; | |
| 547 | − | |
| 548 | 534 | result = usb_control_msg(port->serial->dev, |
| 549 | 535 | usb_sndctrlpipe(port->serial->dev, 0), |
| 550 | 536 | SUSBCRequest_Misc, |
| @@ -559,7 +545,6 @@ static int kobil_ioctl(struct tty_struct *tty, · 8 unmodified lines | ||
| 559 | 545 | dev_dbg(&port->dev, |
| 560 | 546 | "%s - Send reset_all_queues (FLUSH) URB returns: %i\n", |
| 561 | 547 | __func__, result); |
| 562 | − kfree(transfer_buffer); | |
| 563 | 548 | return (result < 0) ? -EIO: 0; |
| 564 | 549 | default: |
| 565 | 550 | return -ENOIOCTLCMD; |
| @@ -269,6 +269,7 @@ static void option_instat_callback(struct urb *urb); · 268 unmodified lines | ||
| 269 | 269 | #define TELIT_PRODUCT_DE910_DUAL 0x1010 |
| 270 | 270 | #define TELIT_PRODUCT_UE910_V2 0x1012 |
| 271 | 271 | #define TELIT_PRODUCT_LE920 0x1200 |
| 272 | +#define TELIT_PRODUCT_LE910 0x1201 | |
| 272 | 273 | |
| 273 | 274 | /* ZTE PRODUCTS */ |
| 274 | 275 | #define ZTE_VENDOR_ID 0x19d2 |
| @@ -362,6 +363,7 @@ static void option_instat_callback(struct urb *urb); · 87 unmodified lines | ||
| 362 | 363 | |
| 363 | 364 | /* Haier products */ |
| 364 | 365 | #define HAIER_VENDOR_ID 0x201e |
| 366 | +#define HAIER_PRODUCT_CE81B 0x10f8 | |
| 365 | 367 | #define HAIER_PRODUCT_CE100 0x2009 |
| 366 | 368 | |
| 367 | 369 | /* Cinterion (formerly Siemens) products */ |
| @@ -589,6 +591,11 @@ static const struct option_blacklist_info zte_1255_blacklist = { · 221 unmodified lines | ||
| 589 | 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 | 599 | static const struct option_blacklist_info telit_le920_blacklist = { |
| 593 | 600 | .sendsetup = BIT(0), |
| 594 | 601 | .reserved = BIT(1) | BIT(5), |
| @@ -1138,6 +1145,8 @@ static const struct usb_device_id option_ids[] = { · 543 unmodified lines | ||
| 1138 | 1145 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) }, |
| 1139 | 1146 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) }, |
| 1140 | 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 | 1150 | { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920), |
| 1142 | 1151 | .driver_info = (kernel_ulong_t)&telit_le920_blacklist }, |
| 1143 | 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[] = { · 477 unmodified lines | ||
| 1621 | 1630 | { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) }, |
| 1622 | 1631 | { USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) }, |
| 1623 | 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 | 1634 | /* Pirelli */ |
| 1625 | 1635 | { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1, 0xff) }, |
| 1626 | 1636 | { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_2, 0xff) }, |