History

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.

Greg Kroah-Hartman committed 12 years ago

Commit 9c19db52 parents 9680b60 7f2719f5 files · +25 −16Browse files

Unified · Split

5 files
  1. drivers/usb/serial/cp210x.c +1 −0
  2. drivers/usb/serial/ftdi_sio.c +3 −0
  3. drivers/usb/serial/ftdi_sio_ids.h +11 −1
  4. drivers/usb/serial/kobil_sct.c +0 −15
  5. drivers/usb/serial/option.c +10 −0
drivers/usb/serial/cp210x.c+1−0
@@ -155,6 +155,7 @@ static const struct usb_device_id id_table[] = { · 154 unmodified lines
155155 { USB_DEVICE(0x18EF, 0xE00F) }, /* ELV USB-I2C-Interface */
156156 { USB_DEVICE(0x1ADB, 0x0001) }, /* Schweitzer Engineering C662 Cable */
157157 { USB_DEVICE(0x1B1C, 0x1C00) }, /* Corsair USB Dongle */
158+ { USB_DEVICE(0x1BA4, 0x0002) }, /* Silicon Labs 358x factory default */
158159 { USB_DEVICE(0x1BE3, 0x07A6) }, /* WAGO 750-923 USB Service Cable */
159160 { USB_DEVICE(0x1D6F, 0x0010) }, /* Seluxit ApS RF Dongle */
160161 { USB_DEVICE(0x1E29, 0x0102) }, /* Festo CPX-USB */
drivers/usb/serial/ftdi_sio.c+3−0
@@ -140,6 +140,7 @@ static struct ftdi_sio_quirk ftdi_8u2232c_quirk = { · 139 unmodified lines
140140 * /sys/bus/usb-serial/drivers/ftdi_sio/new_id and send a patch or report.
141141 */
142142 static const struct usb_device_id id_table_combined[] = {
143+ { USB_DEVICE(FTDI_VID, FTDI_BRICK_PID) },
143144 { USB_DEVICE(FTDI_VID, FTDI_ZEITCONTROL_TAGTRACE_MIFARE_PID) },
144145 { USB_DEVICE(FTDI_VID, FTDI_CTI_MINI_PID) },
145146 { USB_DEVICE(FTDI_VID, FTDI_CTI_NANO_PID) },
@@ -661,6 +662,8 @@ static const struct usb_device_id id_table_combined[] = { · 515 unmodified lines
661662 { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_5_PID) },
662663 { USB_DEVICE(FTDI_VID, XSENS_CONVERTER_6_PID) },
663664 { 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) },
664667 { USB_DEVICE(XSENS_VID, XSENS_CONVERTER_PID) },
665668 { USB_DEVICE(XSENS_VID, XSENS_MTW_PID) },
666669 { USB_DEVICE(FTDI_VID, FTDI_OMNI1509) },
drivers/usb/serial/ftdi_sio_ids.h+11−1
@@ -30,6 +30,12 @@ · 29 unmodified lines
3030
3131 /*** third-party PIDs (using FTDI_VID) ***/
3232
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+
3339 #define FTDI_LUMEL_PD12_PID 0x6002
3440
3541 /*
@@ -143,8 +149,12 @@ · 107 unmodified lines
143149 * Xsens Technologies BV products (http://www.xsens.com).
144150 */
145151 #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
147154 #define XSENS_MTW_PID 0x0200 /* Xsens MTw */
155+#define XSENS_CONVERTER_PID 0xD00D /* Xsens USB-serial converter */
156+
157+/* Xsens devices using FTDI VID */
148158 #define XSENS_CONVERTER_0_PID 0xD388 /* Xsens USB converter */
149159 #define XSENS_CONVERTER_1_PID 0xD389 /* Xsens Wireless Receiver */
150160 #define XSENS_CONVERTER_2_PID 0xD38A
drivers/usb/serial/kobil_sct.c+0−15
@@ -414,8 +414,6 @@ static int kobil_tiocmset(struct tty_struct *tty, · 413 unmodified lines
414414 int result;
415415 int dtr = 0;
416416 int rts = 0;
417− unsigned char *transfer_buffer;
418− int transfer_buffer_length = 8;
419417
420418 /* FIXME: locking ? */
421419 priv = usb_get_serial_port_data(port);
@@ -425,11 +423,6 @@ static int kobil_tiocmset(struct tty_struct *tty, · 3 unmodified lines
425423 return -EINVAL;
426424 }
427425
428− /* allocate memory for transfer buffer */
429− transfer_buffer = kzalloc(transfer_buffer_length, GFP_KERNEL);
430− if (!transfer_buffer)
431− return -ENOMEM;
432−
433426 if (set & TIOCM_RTS)
434427 rts = 1;
435428 if (set & TIOCM_DTR)
@@ -469,7 +462,6 @@ static int kobil_tiocmset(struct tty_struct *tty, · 33 unmodified lines
469462 KOBIL_TIMEOUT);
470463 }
471464 dev_dbg(dev, "%s - Send set_status_line URB returns: %i\n", __func__, result);
472− kfree(transfer_buffer);
473465 return (result < 0) ? result : 0;
474466 }
475467
@@ -530,8 +522,6 @@ static int kobil_ioctl(struct tty_struct *tty, · 54 unmodified lines
530522 {
531523 struct usb_serial_port *port = tty->driver_data;
532524 struct kobil_private *priv = usb_get_serial_port_data(port);
533− unsigned char *transfer_buffer;
534− int transfer_buffer_length = 8;
535525 int result;
536526
537527 if (priv->device_type == KOBIL_USBTWIN_PRODUCT_ID ||
@@ -541,10 +531,6 @@ static int kobil_ioctl(struct tty_struct *tty, · 3 unmodified lines
541531
542532 switch (cmd) {
543533 case TCFLSH:
544− transfer_buffer = kmalloc(transfer_buffer_length, GFP_KERNEL);
545− if (!transfer_buffer)
546− return -ENOBUFS;
547−
548534 result = usb_control_msg(port->serial->dev,
549535 usb_sndctrlpipe(port->serial->dev, 0),
550536 SUSBCRequest_Misc,
@@ -559,7 +545,6 @@ static int kobil_ioctl(struct tty_struct *tty, · 8 unmodified lines
559545 dev_dbg(&port->dev,
560546 "%s - Send reset_all_queues (FLUSH) URB returns: %i\n",
561547 __func__, result);
562− kfree(transfer_buffer);
563548 return (result < 0) ? -EIO: 0;
564549 default:
565550 return -ENOIOCTLCMD;
drivers/usb/serial/option.c+10−0
@@ -269,6 +269,7 @@ static void option_instat_callback(struct urb *urb); · 268 unmodified lines
269269 #define TELIT_PRODUCT_DE910_DUAL 0x1010
270270 #define TELIT_PRODUCT_UE910_V2 0x1012
271271 #define TELIT_PRODUCT_LE920 0x1200
272+#define TELIT_PRODUCT_LE910 0x1201
272273
273274 /* ZTE PRODUCTS */
274275 #define ZTE_VENDOR_ID 0x19d2
@@ -362,6 +363,7 @@ static void option_instat_callback(struct urb *urb); · 87 unmodified lines
362363
363364 /* Haier products */
364365 #define HAIER_VENDOR_ID 0x201e
366+#define HAIER_PRODUCT_CE81B 0x10f8
365367 #define HAIER_PRODUCT_CE100 0x2009
366368
367369 /* Cinterion (formerly Siemens) products */
@@ -589,6 +591,11 @@ static const struct option_blacklist_info zte_1255_blacklist = { · 221 unmodified lines
589591 .reserved = BIT(3) | BIT(4),
590592 };
591593
594+static const struct option_blacklist_info telit_le910_blacklist = {
595+ .sendsetup = BIT(0),
596+ .reserved = BIT(1) | BIT(2),
597+};
598+
592599 static const struct option_blacklist_info telit_le920_blacklist = {
593600 .sendsetup = BIT(0),
594601 .reserved = BIT(1) | BIT(5),
@@ -1138,6 +1145,8 @@ static const struct usb_device_id option_ids[] = { · 543 unmodified lines
11381145 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_CC864_SINGLE) },
11391146 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_DE910_DUAL) },
11401147 { 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 },
11411150 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920),
11421151 .driver_info = (kernel_ulong_t)&telit_le920_blacklist },
11431152 { 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
16211630 { USB_DEVICE(LONGCHEER_VENDOR_ID, ZOOM_PRODUCT_4597) },
16221631 { USB_DEVICE(LONGCHEER_VENDOR_ID, IBALL_3_5G_CONNECT) },
16231632 { USB_DEVICE(HAIER_VENDOR_ID, HAIER_PRODUCT_CE100) },
1633+ { USB_DEVICE_AND_INTERFACE_INFO(HAIER_VENDOR_ID, HAIER_PRODUCT_CE81B, 0xff, 0xff, 0xff) },
16241634 /* Pirelli */
16251635 { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_1, 0xff) },
16261636 { USB_DEVICE_INTERFACE_CLASS(PIRELLI_VENDOR_ID, PIRELLI_PRODUCT_C100_2, 0xff) },

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t