Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'usb-serial-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/johan/usb-serial into usb-next

Johan writes:

USB-serial updates for v3.19-rc1

These changes add a new "simple" driver for Google USB-serial
devices and add support for Huawei Gobi modems to qcserial.

Included are also some removals of unnecessary atomic allocations and
a few spelling fixes.

Signed-off-by: Johan Hovold <johan@kernel.org>

+60 -16
+1 -1
Documentation/usb/usb-serial.txt
··· 145 145 Single port DB-9 serial adapter, pushed as a PDA adapter for iMacs (mostly 146 146 sold in Macintosh catalogs, comes in a translucent white/green dongle). 147 147 Fairly simple device. Firmware is homebrew. 148 - This driver also works for the Xircom/Entrgra single port serial adapter. 148 + This driver also works for the Xircom/Entrega single port serial adapter. 149 149 150 150 Current status: 151 151 Things that work:
+3 -2
drivers/usb/serial/Kconfig
··· 60 60 - Suunto ANT+ USB device. 61 61 - Medtronic CareLink USB device 62 62 - Fundamental Software dongle. 63 + - Google USB serial devices 63 64 - HP4x calculators 64 65 - a number of Motorola phones 65 66 - Novatel Wireless GPS receivers ··· 607 606 If unsure, say N. 608 607 609 608 config USB_SERIAL_XIRCOM 610 - tristate "USB Xircom / Entregra Single Port Serial Driver" 609 + tristate "USB Xircom / Entrega Single Port Serial Driver" 611 610 select USB_EZUSB_FX2 612 611 help 613 - Say Y here if you want to use a Xircom or Entregra single port USB to 612 + Say Y here if you want to use a Xircom or Entrega single port USB to 614 613 serial converter device. This driver makes use of firmware 615 614 developed from scratch by Brian Warner. 616 615
+8 -8
drivers/usb/serial/keyspan_pda.c
··· 1 1 /* 2 - * USB Keyspan PDA / Xircom / Entregra Converter driver 2 + * USB Keyspan PDA / Xircom / Entrega Converter driver 3 3 * 4 4 * Copyright (C) 1999 - 2001 Greg Kroah-Hartman <greg@kroah.com> 5 5 * Copyright (C) 1999, 2000 Brian Warner <warner@lothar.com> ··· 58 58 #define KEYSPAN_PDA_FAKE_ID 0x0103 59 59 #define KEYSPAN_PDA_ID 0x0104 /* no clue */ 60 60 61 - /* For Xircom PGSDB9 and older Entregra version of the same device */ 61 + /* For Xircom PGSDB9 and older Entrega version of the same device */ 62 62 #define XIRCOM_VENDOR_ID 0x085a 63 63 #define XIRCOM_FAKE_ID 0x8027 64 - #define ENTREGRA_VENDOR_ID 0x1645 65 - #define ENTREGRA_FAKE_ID 0x8093 64 + #define ENTREGA_VENDOR_ID 0x1645 65 + #define ENTREGA_FAKE_ID 0x8093 66 66 67 67 static const struct usb_device_id id_table_combined[] = { 68 68 #ifdef KEYSPAN ··· 70 70 #endif 71 71 #ifdef XIRCOM 72 72 { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) }, 73 - { USB_DEVICE(ENTREGRA_VENDOR_ID, ENTREGRA_FAKE_ID) }, 73 + { USB_DEVICE(ENTREGA_VENDOR_ID, ENTREGA_FAKE_ID) }, 74 74 #endif 75 75 { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) }, 76 76 { } /* Terminating entry */ ··· 93 93 #ifdef XIRCOM 94 94 static const struct usb_device_id id_table_fake_xircom[] = { 95 95 { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) }, 96 - { USB_DEVICE(ENTREGRA_VENDOR_ID, ENTREGRA_FAKE_ID) }, 96 + { USB_DEVICE(ENTREGA_VENDOR_ID, ENTREGA_FAKE_ID) }, 97 97 { } 98 98 }; 99 99 #endif ··· 667 667 #endif 668 668 #ifdef XIRCOM 669 669 else if ((le16_to_cpu(serial->dev->descriptor.idVendor) == XIRCOM_VENDOR_ID) || 670 - (le16_to_cpu(serial->dev->descriptor.idVendor) == ENTREGRA_VENDOR_ID)) 670 + (le16_to_cpu(serial->dev->descriptor.idVendor) == ENTREGA_VENDOR_ID)) 671 671 fw_name = "keyspan_pda/xircom_pgs.fw"; 672 672 #endif 673 673 else { ··· 744 744 .owner = THIS_MODULE, 745 745 .name = "xircom_no_firm", 746 746 }, 747 - .description = "Xircom / Entregra PGS - (prerenumeration)", 747 + .description = "Xircom / Entrega PGS - (prerenumeration)", 748 748 .id_table = id_table_fake_xircom, 749 749 .num_ports = 1, 750 750 .attach = keyspan_pda_fake_startup,
+1 -1
drivers/usb/serial/kobil_sct.c
··· 244 244 priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID || 245 245 priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) { 246 246 /* start reading (Adapter B 'cause PNP string) */ 247 - result = usb_submit_urb(port->interrupt_in_urb, GFP_ATOMIC); 247 + result = usb_submit_urb(port->interrupt_in_urb, GFP_KERNEL); 248 248 dev_dbg(dev, "%s - Send read URB returns: %i\n", __func__, result); 249 249 } 250 250
+2 -2
drivers/usb/serial/mos7720.c
··· 1657 1657 write_mos_reg(serial, port_number, IER, 0x0c); 1658 1658 1659 1659 if (port->read_urb->status != -EINPROGRESS) { 1660 - status = usb_submit_urb(port->read_urb, GFP_ATOMIC); 1660 + status = usb_submit_urb(port->read_urb, GFP_KERNEL); 1661 1661 if (status) 1662 1662 dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", status); 1663 1663 } ··· 1702 1702 change_port_settings(tty, mos7720_port, old_termios); 1703 1703 1704 1704 if (port->read_urb->status != -EINPROGRESS) { 1705 - status = usb_submit_urb(port->read_urb, GFP_ATOMIC); 1705 + status = usb_submit_urb(port->read_urb, GFP_KERNEL); 1706 1706 if (status) 1707 1707 dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", status); 1708 1708 }
+2 -2
drivers/usb/serial/mos7840.c
··· 1904 1904 1905 1905 if (mos7840_port->read_urb_busy == false) { 1906 1906 mos7840_port->read_urb_busy = true; 1907 - status = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC); 1907 + status = usb_submit_urb(mos7840_port->read_urb, GFP_KERNEL); 1908 1908 if (status) { 1909 1909 dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", 1910 1910 status); ··· 1968 1968 1969 1969 if (mos7840_port->read_urb_busy == false) { 1970 1970 mos7840_port->read_urb_busy = true; 1971 - status = usb_submit_urb(mos7840_port->read_urb, GFP_ATOMIC); 1971 + status = usb_submit_urb(mos7840_port->read_urb, GFP_KERNEL); 1972 1972 if (status) { 1973 1973 dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", 1974 1974 status);
+33
drivers/usb/serial/qcserial.c
··· 27 27 QCSERIAL_G2K = 0, /* Gobi 2000 */ 28 28 QCSERIAL_G1K = 1, /* Gobi 1000 */ 29 29 QCSERIAL_SWI = 2, /* Sierra Wireless */ 30 + QCSERIAL_HWI = 3, /* Huawei */ 30 31 }; 31 32 32 33 #define DEVICE_G1K(v, p) \ 33 34 USB_DEVICE(v, p), .driver_info = QCSERIAL_G1K 34 35 #define DEVICE_SWI(v, p) \ 35 36 USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI 37 + #define DEVICE_HWI(v, p) \ 38 + USB_DEVICE(v, p), .driver_info = QCSERIAL_HWI 36 39 37 40 static const struct usb_device_id id_table[] = { 38 41 /* Gobi 1000 devices */ ··· 160 157 {DEVICE_SWI(0x413c, 0x81a8)}, /* Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card */ 161 158 {DEVICE_SWI(0x413c, 0x81a9)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card */ 162 159 160 + /* Huawei devices */ 161 + {DEVICE_HWI(0x03f0, 0x581d)}, /* HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) */ 162 + 163 163 { } /* Terminating entry */ 164 164 }; 165 165 MODULE_DEVICE_TABLE(usb, id_table); ··· 286 280 break; 287 281 case 3: 288 282 dev_dbg(dev, "Modem port found\n"); 283 + break; 284 + default: 285 + /* don't claim any unsupported interface */ 286 + altsetting = -1; 287 + break; 288 + } 289 + break; 290 + case QCSERIAL_HWI: 291 + /* 292 + * Huawei layout: 293 + * 0: AT-capable modem port 294 + * 1: DM/DIAG 295 + * 2: AT-capable modem port 296 + * 3: CCID-compatible PCSC interface 297 + * 4: QMI/net 298 + * 5: NMEA 299 + */ 300 + switch (ifnum) { 301 + case 0: 302 + case 2: 303 + dev_dbg(dev, "Modem port found\n"); 304 + break; 305 + case 1: 306 + dev_dbg(dev, "DM/DIAG interface found\n"); 307 + break; 308 + case 5: 309 + dev_dbg(dev, "NMEA GPS interface found\n"); 289 310 break; 290 311 default: 291 312 /* don't claim any unsupported interface */
+10
drivers/usb/serial/usb-serial-simple.c
··· 56 56 { USB_DEVICE(0x8087, 0x0716) } 57 57 DEVICE(flashloader, FLASHLOADER_IDS); 58 58 59 + /* Google Serial USB SubClass */ 60 + #define GOOGLE_IDS() \ 61 + { USB_VENDOR_AND_INTERFACE_INFO(0x18d1, \ 62 + USB_CLASS_VENDOR_SPEC, \ 63 + 0x50, \ 64 + 0x01) } 65 + DEVICE(google, GOOGLE_IDS); 66 + 59 67 /* ViVOpay USB Serial Driver */ 60 68 #define VIVOPAY_IDS() \ 61 69 { USB_DEVICE(0x1d5f, 0x1004) } /* ViVOpay 8800 */ ··· 105 97 &zio_device, 106 98 &funsoft_device, 107 99 &flashloader_device, 100 + &google_device, 108 101 &vivopay_device, 109 102 &moto_modem_device, 110 103 &novatel_gps_device, ··· 120 111 ZIO_IDS(), 121 112 FUNSOFT_IDS(), 122 113 FLASHLOADER_IDS(), 114 + GOOGLE_IDS(), 123 115 VIVOPAY_IDS(), 124 116 MOTO_IDS(), 125 117 NOVATEL_IDS(),