diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-26 13:41:46 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-11-26 13:41:46 -0500 |
commit | 9f10adc54450e246bbbb63cd152a941873068567 (patch) | |
tree | 87a70488a65c767d6af2da28b00995273a53acc1 /drivers/usb | |
parent | 6629467ba5502cac22d31950e207a0334f2a0de5 (diff) | |
parent | e7181d005e84b15fe3121a8d22840adc3395d496 (diff) |
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>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/serial/Kconfig | 5 | ||||
-rw-r--r-- | drivers/usb/serial/keyspan_pda.c | 16 | ||||
-rw-r--r-- | drivers/usb/serial/kobil_sct.c | 2 | ||||
-rw-r--r-- | drivers/usb/serial/mos7720.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/mos7840.c | 4 | ||||
-rw-r--r-- | drivers/usb/serial/qcserial.c | 33 | ||||
-rw-r--r-- | drivers/usb/serial/usb-serial-simple.c | 10 |
7 files changed, 59 insertions, 15 deletions
diff --git a/drivers/usb/serial/Kconfig b/drivers/usb/serial/Kconfig index a69f7cd9d0bf..b7cf1982d1d9 100644 --- a/drivers/usb/serial/Kconfig +++ b/drivers/usb/serial/Kconfig | |||
@@ -60,6 +60,7 @@ config USB_SERIAL_SIMPLE | |||
60 | - Suunto ANT+ USB device. | 60 | - Suunto ANT+ USB device. |
61 | - Medtronic CareLink USB device | 61 | - Medtronic CareLink USB device |
62 | - Fundamental Software dongle. | 62 | - Fundamental Software dongle. |
63 | - Google USB serial devices | ||
63 | - HP4x calculators | 64 | - HP4x calculators |
64 | - a number of Motorola phones | 65 | - a number of Motorola phones |
65 | - Novatel Wireless GPS receivers | 66 | - Novatel Wireless GPS receivers |
@@ -606,10 +607,10 @@ config USB_SERIAL_CYBERJACK | |||
606 | If unsure, say N. | 607 | If unsure, say N. |
607 | 608 | ||
608 | config USB_SERIAL_XIRCOM | 609 | config USB_SERIAL_XIRCOM |
609 | tristate "USB Xircom / Entregra Single Port Serial Driver" | 610 | tristate "USB Xircom / Entrega Single Port Serial Driver" |
610 | select USB_EZUSB_FX2 | 611 | select USB_EZUSB_FX2 |
611 | help | 612 | help |
612 | Say Y here if you want to use a Xircom or Entregra single port USB to | 613 | Say Y here if you want to use a Xircom or Entrega single port USB to |
613 | serial converter device. This driver makes use of firmware | 614 | serial converter device. This driver makes use of firmware |
614 | developed from scratch by Brian Warner. | 615 | developed from scratch by Brian Warner. |
615 | 616 | ||
diff --git a/drivers/usb/serial/keyspan_pda.c b/drivers/usb/serial/keyspan_pda.c index 742d827f876c..dd97d8b572c3 100644 --- a/drivers/usb/serial/keyspan_pda.c +++ b/drivers/usb/serial/keyspan_pda.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * USB Keyspan PDA / Xircom / Entregra Converter driver | 2 | * USB Keyspan PDA / Xircom / Entrega Converter driver |
3 | * | 3 | * |
4 | * Copyright (C) 1999 - 2001 Greg Kroah-Hartman <greg@kroah.com> | 4 | * Copyright (C) 1999 - 2001 Greg Kroah-Hartman <greg@kroah.com> |
5 | * Copyright (C) 1999, 2000 Brian Warner <warner@lothar.com> | 5 | * Copyright (C) 1999, 2000 Brian Warner <warner@lothar.com> |
@@ -58,11 +58,11 @@ struct keyspan_pda_private { | |||
58 | #define KEYSPAN_PDA_FAKE_ID 0x0103 | 58 | #define KEYSPAN_PDA_FAKE_ID 0x0103 |
59 | #define KEYSPAN_PDA_ID 0x0104 /* no clue */ | 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 | #define XIRCOM_VENDOR_ID 0x085a | 62 | #define XIRCOM_VENDOR_ID 0x085a |
63 | #define XIRCOM_FAKE_ID 0x8027 | 63 | #define XIRCOM_FAKE_ID 0x8027 |
64 | #define ENTREGRA_VENDOR_ID 0x1645 | 64 | #define ENTREGA_VENDOR_ID 0x1645 |
65 | #define ENTREGRA_FAKE_ID 0x8093 | 65 | #define ENTREGA_FAKE_ID 0x8093 |
66 | 66 | ||
67 | static const struct usb_device_id id_table_combined[] = { | 67 | static const struct usb_device_id id_table_combined[] = { |
68 | #ifdef KEYSPAN | 68 | #ifdef KEYSPAN |
@@ -70,7 +70,7 @@ static const struct usb_device_id id_table_combined[] = { | |||
70 | #endif | 70 | #endif |
71 | #ifdef XIRCOM | 71 | #ifdef XIRCOM |
72 | { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) }, | 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 | #endif | 74 | #endif |
75 | { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) }, | 75 | { USB_DEVICE(KEYSPAN_VENDOR_ID, KEYSPAN_PDA_ID) }, |
76 | { } /* Terminating entry */ | 76 | { } /* Terminating entry */ |
@@ -93,7 +93,7 @@ static const struct usb_device_id id_table_fake[] = { | |||
93 | #ifdef XIRCOM | 93 | #ifdef XIRCOM |
94 | static const struct usb_device_id id_table_fake_xircom[] = { | 94 | static const struct usb_device_id id_table_fake_xircom[] = { |
95 | { USB_DEVICE(XIRCOM_VENDOR_ID, XIRCOM_FAKE_ID) }, | 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 | #endif | 99 | #endif |
@@ -667,7 +667,7 @@ static int keyspan_pda_fake_startup(struct usb_serial *serial) | |||
667 | #endif | 667 | #endif |
668 | #ifdef XIRCOM | 668 | #ifdef XIRCOM |
669 | else if ((le16_to_cpu(serial->dev->descriptor.idVendor) == XIRCOM_VENDOR_ID) || | 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 | fw_name = "keyspan_pda/xircom_pgs.fw"; | 671 | fw_name = "keyspan_pda/xircom_pgs.fw"; |
672 | #endif | 672 | #endif |
673 | else { | 673 | else { |
@@ -744,7 +744,7 @@ static struct usb_serial_driver xircom_pgs_fake_device = { | |||
744 | .owner = THIS_MODULE, | 744 | .owner = THIS_MODULE, |
745 | .name = "xircom_no_firm", | 745 | .name = "xircom_no_firm", |
746 | }, | 746 | }, |
747 | .description = "Xircom / Entregra PGS - (prerenumeration)", | 747 | .description = "Xircom / Entrega PGS - (prerenumeration)", |
748 | .id_table = id_table_fake_xircom, | 748 | .id_table = id_table_fake_xircom, |
749 | .num_ports = 1, | 749 | .num_ports = 1, |
750 | .attach = keyspan_pda_fake_startup, | 750 | .attach = keyspan_pda_fake_startup, |
diff --git a/drivers/usb/serial/kobil_sct.c b/drivers/usb/serial/kobil_sct.c index 02c420af251e..2363654cafc9 100644 --- a/drivers/usb/serial/kobil_sct.c +++ b/drivers/usb/serial/kobil_sct.c | |||
@@ -244,7 +244,7 @@ static int kobil_open(struct tty_struct *tty, struct usb_serial_port *port) | |||
244 | priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID || | 244 | priv->device_type == KOBIL_ADAPTER_B_PRODUCT_ID || |
245 | priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) { | 245 | priv->device_type == KOBIL_KAAN_SIM_PRODUCT_ID) { |
246 | /* start reading (Adapter B 'cause PNP string) */ | 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 | dev_dbg(dev, "%s - Send read URB returns: %i\n", __func__, result); | 248 | dev_dbg(dev, "%s - Send read URB returns: %i\n", __func__, result); |
249 | } | 249 | } |
250 | 250 | ||
diff --git a/drivers/usb/serial/mos7720.c b/drivers/usb/serial/mos7720.c index dfd728a263d2..312b0fee8d54 100644 --- a/drivers/usb/serial/mos7720.c +++ b/drivers/usb/serial/mos7720.c | |||
@@ -1657,7 +1657,7 @@ static void change_port_settings(struct tty_struct *tty, | |||
1657 | write_mos_reg(serial, port_number, IER, 0x0c); | 1657 | write_mos_reg(serial, port_number, IER, 0x0c); |
1658 | 1658 | ||
1659 | if (port->read_urb->status != -EINPROGRESS) { | 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 | if (status) | 1661 | if (status) |
1662 | dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", status); | 1662 | dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", status); |
1663 | } | 1663 | } |
@@ -1702,7 +1702,7 @@ static void mos7720_set_termios(struct tty_struct *tty, | |||
1702 | change_port_settings(tty, mos7720_port, old_termios); | 1702 | change_port_settings(tty, mos7720_port, old_termios); |
1703 | 1703 | ||
1704 | if (port->read_urb->status != -EINPROGRESS) { | 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 | if (status) | 1706 | if (status) |
1707 | dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", status); | 1707 | dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", status); |
1708 | } | 1708 | } |
diff --git a/drivers/usb/serial/mos7840.c b/drivers/usb/serial/mos7840.c index 3d88eefdf1d1..220b4be89641 100644 --- a/drivers/usb/serial/mos7840.c +++ b/drivers/usb/serial/mos7840.c | |||
@@ -1904,7 +1904,7 @@ static void mos7840_change_port_settings(struct tty_struct *tty, | |||
1904 | 1904 | ||
1905 | if (mos7840_port->read_urb_busy == false) { | 1905 | if (mos7840_port->read_urb_busy == false) { |
1906 | mos7840_port->read_urb_busy = true; | 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 | if (status) { | 1908 | if (status) { |
1909 | dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", | 1909 | dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", |
1910 | status); | 1910 | status); |
@@ -1968,7 +1968,7 @@ static void mos7840_set_termios(struct tty_struct *tty, | |||
1968 | 1968 | ||
1969 | if (mos7840_port->read_urb_busy == false) { | 1969 | if (mos7840_port->read_urb_busy == false) { |
1970 | mos7840_port->read_urb_busy = true; | 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 | if (status) { | 1972 | if (status) { |
1973 | dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", | 1973 | dev_dbg(&port->dev, "usb_submit_urb(read bulk) failed, status = %d\n", |
1974 | status); | 1974 | status); |
diff --git a/drivers/usb/serial/qcserial.c b/drivers/usb/serial/qcserial.c index b2aa003bf411..cb3e14780a7e 100644 --- a/drivers/usb/serial/qcserial.c +++ b/drivers/usb/serial/qcserial.c | |||
@@ -27,12 +27,15 @@ enum qcserial_layouts { | |||
27 | QCSERIAL_G2K = 0, /* Gobi 2000 */ | 27 | QCSERIAL_G2K = 0, /* Gobi 2000 */ |
28 | QCSERIAL_G1K = 1, /* Gobi 1000 */ | 28 | QCSERIAL_G1K = 1, /* Gobi 1000 */ |
29 | QCSERIAL_SWI = 2, /* Sierra Wireless */ | 29 | QCSERIAL_SWI = 2, /* Sierra Wireless */ |
30 | QCSERIAL_HWI = 3, /* Huawei */ | ||
30 | }; | 31 | }; |
31 | 32 | ||
32 | #define DEVICE_G1K(v, p) \ | 33 | #define DEVICE_G1K(v, p) \ |
33 | USB_DEVICE(v, p), .driver_info = QCSERIAL_G1K | 34 | USB_DEVICE(v, p), .driver_info = QCSERIAL_G1K |
34 | #define DEVICE_SWI(v, p) \ | 35 | #define DEVICE_SWI(v, p) \ |
35 | USB_DEVICE(v, p), .driver_info = QCSERIAL_SWI | 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 | static const struct usb_device_id id_table[] = { | 40 | static const struct usb_device_id id_table[] = { |
38 | /* Gobi 1000 devices */ | 41 | /* Gobi 1000 devices */ |
@@ -157,6 +160,9 @@ static const struct usb_device_id id_table[] = { | |||
157 | {DEVICE_SWI(0x413c, 0x81a8)}, /* Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card */ | 160 | {DEVICE_SWI(0x413c, 0x81a8)}, /* Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card */ |
158 | {DEVICE_SWI(0x413c, 0x81a9)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card */ | 161 | {DEVICE_SWI(0x413c, 0x81a9)}, /* Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card */ |
159 | 162 | ||
163 | /* Huawei devices */ | ||
164 | {DEVICE_HWI(0x03f0, 0x581d)}, /* HP lt4112 LTE/HSPA+ Gobi 4G Modem (Huawei me906e) */ | ||
165 | |||
160 | { } /* Terminating entry */ | 166 | { } /* Terminating entry */ |
161 | }; | 167 | }; |
162 | MODULE_DEVICE_TABLE(usb, id_table); | 168 | MODULE_DEVICE_TABLE(usb, id_table); |
@@ -287,6 +293,33 @@ static int qcprobe(struct usb_serial *serial, const struct usb_device_id *id) | |||
287 | break; | 293 | break; |
288 | } | 294 | } |
289 | break; | 295 | break; |
296 | case QCSERIAL_HWI: | ||
297 | /* | ||
298 | * Huawei layout: | ||
299 | * 0: AT-capable modem port | ||
300 | * 1: DM/DIAG | ||
301 | * 2: AT-capable modem port | ||
302 | * 3: CCID-compatible PCSC interface | ||
303 | * 4: QMI/net | ||
304 | * 5: NMEA | ||
305 | */ | ||
306 | switch (ifnum) { | ||
307 | case 0: | ||
308 | case 2: | ||
309 | dev_dbg(dev, "Modem port found\n"); | ||
310 | break; | ||
311 | case 1: | ||
312 | dev_dbg(dev, "DM/DIAG interface found\n"); | ||
313 | break; | ||
314 | case 5: | ||
315 | dev_dbg(dev, "NMEA GPS interface found\n"); | ||
316 | break; | ||
317 | default: | ||
318 | /* don't claim any unsupported interface */ | ||
319 | altsetting = -1; | ||
320 | break; | ||
321 | } | ||
322 | break; | ||
290 | default: | 323 | default: |
291 | dev_err(dev, "unsupported device layout type: %lu\n", | 324 | dev_err(dev, "unsupported device layout type: %lu\n", |
292 | id->driver_info); | 325 | id->driver_info); |
diff --git a/drivers/usb/serial/usb-serial-simple.c b/drivers/usb/serial/usb-serial-simple.c index 7064eb8d6142..bc310112eae9 100644 --- a/drivers/usb/serial/usb-serial-simple.c +++ b/drivers/usb/serial/usb-serial-simple.c | |||
@@ -56,6 +56,14 @@ DEVICE(funsoft, FUNSOFT_IDS); | |||
56 | { USB_DEVICE(0x8087, 0x0716) } | 56 | { USB_DEVICE(0x8087, 0x0716) } |
57 | DEVICE(flashloader, FLASHLOADER_IDS); | 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 | /* ViVOpay USB Serial Driver */ | 67 | /* ViVOpay USB Serial Driver */ |
60 | #define VIVOPAY_IDS() \ | 68 | #define VIVOPAY_IDS() \ |
61 | { USB_DEVICE(0x1d5f, 0x1004) } /* ViVOpay 8800 */ | 69 | { USB_DEVICE(0x1d5f, 0x1004) } /* ViVOpay 8800 */ |
@@ -97,6 +105,7 @@ static struct usb_serial_driver * const serial_drivers[] = { | |||
97 | &zio_device, | 105 | &zio_device, |
98 | &funsoft_device, | 106 | &funsoft_device, |
99 | &flashloader_device, | 107 | &flashloader_device, |
108 | &google_device, | ||
100 | &vivopay_device, | 109 | &vivopay_device, |
101 | &moto_modem_device, | 110 | &moto_modem_device, |
102 | &novatel_gps_device, | 111 | &novatel_gps_device, |
@@ -111,6 +120,7 @@ static const struct usb_device_id id_table[] = { | |||
111 | ZIO_IDS(), | 120 | ZIO_IDS(), |
112 | FUNSOFT_IDS(), | 121 | FUNSOFT_IDS(), |
113 | FLASHLOADER_IDS(), | 122 | FLASHLOADER_IDS(), |
123 | GOOGLE_IDS(), | ||
114 | VIVOPAY_IDS(), | 124 | VIVOPAY_IDS(), |
115 | MOTO_IDS(), | 125 | MOTO_IDS(), |
116 | NOVATEL_IDS(), | 126 | NOVATEL_IDS(), |