aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-12 10:13:27 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-12 10:13:27 -0400
commitfa25425593814d1157fa592201e335c33694aeaa (patch)
treef92c24061680437da54e14082bbd2780c3dcd377 /drivers/usb
parent539587511835ea12d8daa444cbed766cf2bc3612 (diff)
parent647024a7df36014bbc4479d92d88e6b77c0afcf6 (diff)
Merge tag 'usb-serial-4.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-linus
Johan writes: USB-serial fixes for v4.8-rc2 Here is a fix of a memory leak in a driver-registration error path, and some new device ids. Signed-off-by: Johan Hovold <johan@kernel.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/serial/ftdi_sio.c3
-rw-r--r--drivers/usb/serial/ftdi_sio_ids.h12
-rw-r--r--drivers/usb/serial/option.c22
-rw-r--r--drivers/usb/serial/usb-serial.c4
4 files changed, 40 insertions, 1 deletions
diff --git a/drivers/usb/serial/ftdi_sio.c b/drivers/usb/serial/ftdi_sio.c
index 00820809139a..b2d767e743fc 100644
--- a/drivers/usb/serial/ftdi_sio.c
+++ b/drivers/usb/serial/ftdi_sio.c
@@ -648,6 +648,8 @@ static const struct usb_device_id id_table_combined[] = {
648 { USB_DEVICE(FTDI_VID, FTDI_ELV_TFD128_PID) }, 648 { USB_DEVICE(FTDI_VID, FTDI_ELV_TFD128_PID) },
649 { USB_DEVICE(FTDI_VID, FTDI_ELV_FM3RX_PID) }, 649 { USB_DEVICE(FTDI_VID, FTDI_ELV_FM3RX_PID) },
650 { USB_DEVICE(FTDI_VID, FTDI_ELV_WS777_PID) }, 650 { USB_DEVICE(FTDI_VID, FTDI_ELV_WS777_PID) },
651 { USB_DEVICE(FTDI_VID, FTDI_PALMSENS_PID) },
652 { USB_DEVICE(FTDI_VID, FTDI_IVIUM_XSTAT_PID) },
651 { USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) }, 653 { USB_DEVICE(FTDI_VID, LINX_SDMUSBQSS_PID) },
652 { USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) }, 654 { USB_DEVICE(FTDI_VID, LINX_MASTERDEVEL2_PID) },
653 { USB_DEVICE(FTDI_VID, LINX_FUTURE_0_PID) }, 655 { USB_DEVICE(FTDI_VID, LINX_FUTURE_0_PID) },
@@ -1008,6 +1010,7 @@ static const struct usb_device_id id_table_combined[] = {
1008 { USB_DEVICE(ICPDAS_VID, ICPDAS_I7560U_PID) }, 1010 { USB_DEVICE(ICPDAS_VID, ICPDAS_I7560U_PID) },
1009 { USB_DEVICE(ICPDAS_VID, ICPDAS_I7561U_PID) }, 1011 { USB_DEVICE(ICPDAS_VID, ICPDAS_I7561U_PID) },
1010 { USB_DEVICE(ICPDAS_VID, ICPDAS_I7563U_PID) }, 1012 { USB_DEVICE(ICPDAS_VID, ICPDAS_I7563U_PID) },
1013 { USB_DEVICE(WICED_VID, WICED_USB20706V2_PID) },
1011 { } /* Terminating entry */ 1014 { } /* Terminating entry */
1012}; 1015};
1013 1016
diff --git a/drivers/usb/serial/ftdi_sio_ids.h b/drivers/usb/serial/ftdi_sio_ids.h
index c5d6c1e73e8e..f87a938cf005 100644
--- a/drivers/usb/serial/ftdi_sio_ids.h
+++ b/drivers/usb/serial/ftdi_sio_ids.h
@@ -406,6 +406,12 @@
406#define FTDI_4N_GALAXY_DE_3_PID 0xF3C2 406#define FTDI_4N_GALAXY_DE_3_PID 0xF3C2
407 407
408/* 408/*
409 * Ivium Technologies product IDs
410 */
411#define FTDI_PALMSENS_PID 0xf440
412#define FTDI_IVIUM_XSTAT_PID 0xf441
413
414/*
409 * Linx Technologies product ids 415 * Linx Technologies product ids
410 */ 416 */
411#define LINX_SDMUSBQSS_PID 0xF448 /* Linx SDM-USB-QS-S */ 417#define LINX_SDMUSBQSS_PID 0xF448 /* Linx SDM-USB-QS-S */
@@ -673,6 +679,12 @@
673#define INTREPID_NEOVI_PID 0x0701 679#define INTREPID_NEOVI_PID 0x0701
674 680
675/* 681/*
682 * WICED USB UART
683 */
684#define WICED_VID 0x0A5C
685#define WICED_USB20706V2_PID 0x6422
686
687/*
676 * Definitions for ID TECH (www.idt-net.com) devices 688 * Definitions for ID TECH (www.idt-net.com) devices
677 */ 689 */
678#define IDTECH_VID 0x0ACD /* ID TECH Vendor ID */ 690#define IDTECH_VID 0x0ACD /* ID TECH Vendor ID */
diff --git a/drivers/usb/serial/option.c b/drivers/usb/serial/option.c
index 8e07536c233a..bc472584a229 100644
--- a/drivers/usb/serial/option.c
+++ b/drivers/usb/serial/option.c
@@ -274,6 +274,12 @@ static void option_instat_callback(struct urb *urb);
274#define TELIT_PRODUCT_LE920 0x1200 274#define TELIT_PRODUCT_LE920 0x1200
275#define TELIT_PRODUCT_LE910 0x1201 275#define TELIT_PRODUCT_LE910 0x1201
276#define TELIT_PRODUCT_LE910_USBCFG4 0x1206 276#define TELIT_PRODUCT_LE910_USBCFG4 0x1206
277#define TELIT_PRODUCT_LE920A4_1207 0x1207
278#define TELIT_PRODUCT_LE920A4_1208 0x1208
279#define TELIT_PRODUCT_LE920A4_1211 0x1211
280#define TELIT_PRODUCT_LE920A4_1212 0x1212
281#define TELIT_PRODUCT_LE920A4_1213 0x1213
282#define TELIT_PRODUCT_LE920A4_1214 0x1214
277 283
278/* ZTE PRODUCTS */ 284/* ZTE PRODUCTS */
279#define ZTE_VENDOR_ID 0x19d2 285#define ZTE_VENDOR_ID 0x19d2
@@ -628,6 +634,11 @@ static const struct option_blacklist_info telit_le920_blacklist = {
628 .reserved = BIT(1) | BIT(5), 634 .reserved = BIT(1) | BIT(5),
629}; 635};
630 636
637static const struct option_blacklist_info telit_le920a4_blacklist_1 = {
638 .sendsetup = BIT(0),
639 .reserved = BIT(1),
640};
641
631static const struct option_blacklist_info telit_le922_blacklist_usbcfg0 = { 642static const struct option_blacklist_info telit_le922_blacklist_usbcfg0 = {
632 .sendsetup = BIT(2), 643 .sendsetup = BIT(2),
633 .reserved = BIT(0) | BIT(1) | BIT(3), 644 .reserved = BIT(0) | BIT(1) | BIT(3),
@@ -1203,6 +1214,16 @@ static const struct usb_device_id option_ids[] = {
1203 .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 }, 1214 .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 },
1204 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920), 1215 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920),
1205 .driver_info = (kernel_ulong_t)&telit_le920_blacklist }, 1216 .driver_info = (kernel_ulong_t)&telit_le920_blacklist },
1217 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1207) },
1218 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1208),
1219 .driver_info = (kernel_ulong_t)&telit_le920a4_blacklist_1 },
1220 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1211),
1221 .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 },
1222 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1212),
1223 .driver_info = (kernel_ulong_t)&telit_le920a4_blacklist_1 },
1224 { USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1213, 0xff) },
1225 { USB_DEVICE(TELIT_VENDOR_ID, TELIT_PRODUCT_LE920A4_1214),
1226 .driver_info = (kernel_ulong_t)&telit_le922_blacklist_usbcfg3 },
1206 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */ 1227 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, ZTE_PRODUCT_MF622, 0xff, 0xff, 0xff) }, /* ZTE WCDMA products */
1207 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff), 1228 { USB_DEVICE_AND_INTERFACE_INFO(ZTE_VENDOR_ID, 0x0002, 0xff, 0xff, 0xff),
1208 .driver_info = (kernel_ulong_t)&net_intf1_blacklist }, 1229 .driver_info = (kernel_ulong_t)&net_intf1_blacklist },
@@ -1966,6 +1987,7 @@ static const struct usb_device_id option_ids[] = {
1966 .driver_info = (kernel_ulong_t)&net_intf4_blacklist }, 1987 .driver_info = (kernel_ulong_t)&net_intf4_blacklist },
1967 { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */ 1988 { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e01, 0xff, 0xff, 0xff) }, /* D-Link DWM-152/C1 */
1968 { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */ 1989 { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x3e02, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/C1 */
1990 { USB_DEVICE_AND_INTERFACE_INFO(0x07d1, 0x7e11, 0xff, 0xff, 0xff) }, /* D-Link DWM-156/A3 */
1969 { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x4000, 0xff) }, /* OLICARD300 - MT6225 */ 1991 { USB_DEVICE_INTERFACE_CLASS(0x2020, 0x4000, 0xff) }, /* OLICARD300 - MT6225 */
1970 { USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) }, 1992 { USB_DEVICE(INOVIA_VENDOR_ID, INOVIA_SEW858) },
1971 { USB_DEVICE(VIATELECOM_VENDOR_ID, VIATELECOM_PRODUCT_CDS7) }, 1993 { USB_DEVICE(VIATELECOM_VENDOR_ID, VIATELECOM_PRODUCT_CDS7) },
diff --git a/drivers/usb/serial/usb-serial.c b/drivers/usb/serial/usb-serial.c
index b1b9bac44016..d213cf44a7e4 100644
--- a/drivers/usb/serial/usb-serial.c
+++ b/drivers/usb/serial/usb-serial.c
@@ -1433,7 +1433,7 @@ int usb_serial_register_drivers(struct usb_serial_driver *const serial_drivers[]
1433 1433
1434 rc = usb_register(udriver); 1434 rc = usb_register(udriver);
1435 if (rc) 1435 if (rc)
1436 return rc; 1436 goto failed_usb_register;
1437 1437
1438 for (sd = serial_drivers; *sd; ++sd) { 1438 for (sd = serial_drivers; *sd; ++sd) {
1439 (*sd)->usb_driver = udriver; 1439 (*sd)->usb_driver = udriver;
@@ -1451,6 +1451,8 @@ int usb_serial_register_drivers(struct usb_serial_driver *const serial_drivers[]
1451 while (sd-- > serial_drivers) 1451 while (sd-- > serial_drivers)
1452 usb_serial_deregister(*sd); 1452 usb_serial_deregister(*sd);
1453 usb_deregister(udriver); 1453 usb_deregister(udriver);
1454failed_usb_register:
1455 kfree(udriver);
1454 return rc; 1456 return rc;
1455} 1457}
1456EXPORT_SYMBOL_GPL(usb_serial_register_drivers); 1458EXPORT_SYMBOL_GPL(usb_serial_register_drivers);