History log of /drivers/usb/serial/qcserial.c
Revision Date Author Comments
0ce5fb58564fd85aa8fd2d24209900e2e845317b 29-May-2014 Aleksander Morgado <aleksander@aleksander.es> usb: qcserial: add additional Sierra Wireless QMI devices

A set of new VID/PIDs retrieved from the out-of-tree GobiNet/GobiSerial
Sierra Wireless drivers.

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Link: http://marc.info/?l=linux-usb&m=140136310027293&w=2
Cc: <stable@vger.kernel.org> # backport in link above
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ff1fcd50bc2459744e6f948310bc18eb7d6e8c72 28-May-2014 Aleksander Morgado <aleksander@aleksander.es> usb: qcserial: add Netgear AirCard 341U

Signed-off-by: Aleksander Morgado <aleksander@aleksander.es>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
48292d8b0726412646086821656193dbc289ce4c 27-Apr-2014 Bjørn Mork <bjorn@mork.no> usb: qcserial: remove interface number matching

Matching on interface numbers was not such a good idea
for multi-function serial devices after all. It is much
better do create well defined device layouts, allowing
a single match entry per device.

Remove this now unused code.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8bc7a069402e1a443ded8088a8be0dc8aa1c2c9b 27-Apr-2014 Bjørn Mork <bjorn@mork.no> usb: qcserial: define and use Sierra Wireless layout

All the "non Gobi" Qualcomm based devices handled by this
driver share a common standard Sierra Wireless specific
layout. Adding code specifically for this layout allow
us to reduce the number of match entries per device from
three to one.

This change will result in a penalty wrt stable backports,
but simplifies new Sierra device addtitions in the long
term.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
d712ca91db6d5463ca5a9b06eb6ba937c59a15fa 27-Apr-2014 Bjørn Mork <bjorn@mork.no> usb: qcserial: refactor device layout selection

Preparing for more supported standard device layouts. Keeping
the matching macros unchanged to avoid breaking stable
backporting of new device additions.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ce1b066136a30079c4e6e81e015ad9bc2180d46f 27-Apr-2014 Bjørn Mork <bjorn@mork.no> usb: qcserial: fix multiline comment coding style

Use a consistent style for all multiline comments.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
4d7c0136a54f62501f8a34c4d08a5e0258d3d3ca 27-Apr-2014 Bjørn Mork <bjorn@mork.no> usb: qcserial: add a number of Dell devices

Dan writes:

"The Dell drivers use the same configuration for PIDs:

81A2: Dell Wireless 5806 Gobi(TM) 4G LTE Mobile Broadband Card
81A3: Dell Wireless 5570 HSPA+ (42Mbps) Mobile Broadband Card
81A4: Dell Wireless 5570e HSPA+ (42Mbps) Mobile Broadband Card
81A8: Dell Wireless 5808 Gobi(TM) 4G LTE Mobile Broadband Card
81A9: Dell Wireless 5808e Gobi(TM) 4G LTE Mobile Broadband Card

These devices are all clearly Sierra devices, but are also definitely
Gobi-based. The A8 might be the MC7700/7710 and A9 is likely a MC7750.

>From DellGobi5kSetup.exe from the Dell drivers:

usbif0: serial/firmware loader?
usbif2: nmea
usbif3: modem/ppp
usbif8: net/QMI"

Cc: <stable@vger.kernel.org>
Reported-by: AceLan Kao <acelan.kao@canonical.com>
Reported-by: Dan Williams <dcbw@redhat.com>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
bce4f588f19d59fc07fadfeb0b2a3a06c942827a 25-Apr-2014 Bjørn Mork <bjorn@mork.no> usb: qcserial: add Sierra Wireless MC7305/MC7355

Cc: <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
70a3615fc07c2330ed7c1e922f3c44f4a67c0762 25-Apr-2014 Bjørn Mork <bjorn@mork.no> usb: qcserial: add Sierra Wireless MC73xx

Cc: <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
a00986f81182a69dee4d2c48e8c19805bdf0f790 25-Apr-2014 Bjørn Mork <bjorn@mork.no> usb: qcserial: add Sierra Wireless EM7355

Cc: <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
f948dcf9e9973c05d957bc65b3185682f45feda3 04-Feb-2014 Bjørn Mork <bjorn@mork.no> usb: qcserial: add Netgear Aircard 340U

This device was mentioned in an OpenWRT forum. Seems to have a "standard"
Sierra Wireless ifnumber to function layout:
0: qcdm
2: nmea
3: modem
8: qmi
9: storage

Cc: <stable@vger.kernel.org>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
a254810a86aaaac4ac6ba44fa934558b042a17a7 20-Jun-2013 Dan Williams <dcbw@redhat.com> USB: option,qcserial: move Novatel Gobi1K IDs to qcserial

These devices are all Gobi1K devices (according to the Windows INF
files) and should be handled by qcserial instead of option. Their
network port is handled by qmi_wwan.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
8a2f132a01c2dd4c3905fa560f92019761ed72b1 24-May-2013 Richard Weinberger <richard@nod.at> USB: serial: Add Option GTM681W to qcserial device table.

The Option GTM681W uses a qualcomm chip and can be
served by the qcserial device driver.

Signed-off-by: Richard Weinberger <richard@nod.at>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3f8bc5e4da29c7e05edeca6b475abb4fb01a5a13 13-Mar-2013 Dan Williams <dcbw@redhat.com> qcserial: bind to DM/DIAG port on Gobi 1K devices

Turns out we just need altsetting 1 and then we can talk to it.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
78796ae17eacedcdcaaeb03ba73d2e532a4c8f83 28-Jan-2013 Daniele Palmas <dnlplm@gmail.com> USB: qcserial: add Telit Gobi QDL device

Add VID and PID for Telit Gobi QDL device

Signed-off-by: Daniele Palmas <dnlplm@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
961be09e1ead58509ed4bed0d5819a15d8613d8d 25-Oct-2012 Johan Hovold <jhovold@gmail.com> USB: qcserial: fix interface-data memory leak in error path

Move interface data allocation to attach so that it is deallocated
should usb-serial probe fail.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
b8f0e82044c9ba40e92340c8a6d47d6bd6d819bc 25-Oct-2012 Johan Hovold <jhovold@gmail.com> USB: usb-wwan: fix multiple memory leaks in error paths

Fix port-data memory leak in usb-serial probe error path by moving port
data allocation to port_probe.

Since commit a1028f0abf ("usb: usb_wwan: replace release and disconnect
with a port_remove hook") port data is deallocated in port_remove. This
leaves a possibility for memory leaks if usb-serial probe fails after
attach but before the port in question has been successfully registered.

Note that this patch also fixes two additional memory leaks in the error
path of attach should port initialisation fail for any port as the urbs
were never freed and neither was the data of any of the successfully
initialised ports.

Compile-only tested.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3da3bf76cb6ccd1fbb9205bfa9e8a13dce6e3238 14-Sep-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: qcserial.c: remove debug module parameter

Now that the dbg() macro is no longer being used in the driver,
the debug module parameter doesn't do anything at all. So remove
it so as to not confuse people.

CC: "Bjørn Mork" <bjorn@mork.no>
CC: Dan Williams <dcbw@redhat.com>
CC: Thomas Tuttle <ttuttle@chromium.org>
CC: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
731879f8e3d4c61220462160311fa650a8b96abf 23-Jul-2012 Dan Williams <dcbw@redhat.com> USB: qcserial: fix port handling on Gobi 1K and 2K+

Bjorn's latest patchset does break Gobi 1K and 2K because on both
devices as it claims usb interface 0. That's because usbif 0 is not
handled in the switch statement, and thus the if0 gets claimed when it
should not. So let's just make things even simpler yet, and handle both
the 1K and 2K+ cases separately. This patch should not affect the new
Sierra device support, because those devices are matched via
interface-specific matching and thus should never hit the composite
code.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Tested-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
c54103d00957a6725be3b2f4abdf230680db06f4 23-Jul-2012 Dan Williams <dcbw@redhat.com> USB: qcserial: fix port handling on Gobi 1K and 2K+

Bjorn's latest patchset does break Gobi 1K and 2K because on both
devices as it claims usb interface 0. That's because usbif 0 is not
handled in the switch statement, and thus the if0 gets claimed when it
should not. So let's just make things even simpler yet, and handle both
the 1K and 2K+ cases separately. This patch should not affect the new
Sierra device support, because those devices are matched via
interface-specific matching and thus should never hit the composite
code.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Tested-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
a1028f0abfb321e0f87c10ac0cce8508097c2b42 27-Jul-2012 Bjørn Mork <bjorn@mork.no> usb: usb_wwan: replace release and disconnect with a port_remove hook

Doing port specific cleanup in the .port_remove hook is a
lot simpler and safer than doing it in the USB driver
.release or .disconnect methods. The removal of the port
from the usb-serial bus will happen before the USB driver
cleanup, so we must be careful about accessing port specific
driver data from any USB driver functions.

This problem surfaced after the commit

0998d0631 device-core: Ensure drvdata = NULL when no driver is bound

which turned the previous unsafe access into a reliable NULL
pointer dereference.

Fixes the following Oops:

[ 243.148471] BUG: unable to handle kernel NULL pointer dereference at (null)
[ 243.148508] IP: [<ffffffffa0468527>] stop_read_write_urbs+0x37/0x80 [usb_wwan]
[ 243.148556] PGD 79d60067 PUD 79d61067 PMD 0
[ 243.148590] Oops: 0000 [#1] SMP
[ 243.148617] Modules linked in: sr_mod cdrom qmi_wwan usbnet option cdc_wdm usb_wwan usbserial usb_storage uas fuse af_packet ip6table_filter ip6_tables iptable_filter ip_tables x_tables tun edd
cpufreq_conservative cpufreq_userspace cpufreq_powersave snd_pcm_oss snd_mixer_oss acpi_cpufreq snd_seq mperf snd_seq_device coretemp arc4 sg hp_wmi sparse_keymap uvcvideo videobuf2_core
videodev videobuf2_vmalloc videobuf2_memops rtl8192ce rtl8192c_common rtlwifi joydev pcspkr microcode mac80211 i2c_i801 lpc_ich r8169 snd_hda_codec_idt cfg80211 snd_hda_intel snd_hda_codec rfkill
snd_hwdep snd_pcm wmi snd_timer ac snd soundcore snd_page_alloc battery uhci_hcd i915 drm_kms_helper drm i2c_algo_bit ehci_hcd thermal usbcore video usb_common button processor thermal_sys
[ 243.149007] CPU 1
[ 243.149027] Pid: 135, comm: khubd Not tainted 3.5.0-rc7-next-20120720-1-vanilla #1 Hewlett-Packard HP Mini 110-3700 /1584
[ 243.149072] RIP: 0010:[<ffffffffa0468527>] [<ffffffffa0468527>] stop_read_write_urbs+0x37/0x80 [usb_wwan]
[ 243.149118] RSP: 0018:ffff880037e75b30 EFLAGS: 00010286
[ 243.149133] RAX: 0000000000000000 RBX: 0000000000000000 RCX: ffff88005912aa28
[ 243.149150] RDX: ffff88005e95f028 RSI: 0000000000000000 RDI: ffff88005f7c1a10
[ 243.149166] RBP: ffff880037e75b60 R08: 0000000000000000 R09: ffffffff812cea90
[ 243.149182] R10: 0000000000000000 R11: 0000000000000001 R12: ffff88006539b440
[ 243.149198] R13: ffff88006539b440 R14: 0000000000000000 R15: 0000000000000000
[ 243.149216] FS: 0000000000000000(0000) GS:ffff88007ee80000(0000) knlGS:0000000000000000
[ 243.149233] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b
[ 243.149248] CR2: 0000000000000000 CR3: 0000000079fe0000 CR4: 00000000000007e0
[ 243.149264] DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
[ 243.149280] DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
[ 243.149298] Process khubd (pid: 135, threadinfo ffff880037e74000, task ffff880037d40600)
[ 243.149313] Stack:
[ 243.149323] ffff880037e75b40 ffff88006539b440 ffff8800799bc830 ffff88005f7c1800
[ 243.149348] 0000000000000001 ffff88006539b448 ffff880037e75b70 ffffffffa04685e9
[ 243.149371] ffff880037e75bc0 ffffffffa0473765 ffff880037354988 ffff88007b594800
[ 243.149395] Call Trace:
[ 243.149419] [<ffffffffa04685e9>] usb_wwan_disconnect+0x9/0x10 [usb_wwan]
[ 243.149447] [<ffffffffa0473765>] usb_serial_disconnect+0xd5/0x120 [usbserial]
[ 243.149511] [<ffffffffa0046b48>] usb_unbind_interface+0x58/0x1a0 [usbcore]
[ 243.149545] [<ffffffff8139ebd7>] __device_release_driver+0x77/0xe0
[ 243.149567] [<ffffffff8139ec67>] device_release_driver+0x27/0x40
[ 243.149587] [<ffffffff8139e5cf>] bus_remove_device+0xdf/0x150
[ 243.149608] [<ffffffff8139bc78>] device_del+0x118/0x1a0
[ 243.149661] [<ffffffffa0044590>] usb_disable_device+0xb0/0x280 [usbcore]
[ 243.149718] [<ffffffffa003c6fd>] usb_disconnect+0x9d/0x140 [usbcore]
[ 243.149770] [<ffffffffa003da7d>] hub_port_connect_change+0xad/0x8a0 [usbcore]
[ 243.149825] [<ffffffffa0043bf5>] ? usb_control_msg+0xe5/0x110 [usbcore]
[ 243.149878] [<ffffffffa003e6e3>] hub_events+0x473/0x760 [usbcore]
[ 243.149931] [<ffffffffa003ea05>] hub_thread+0x35/0x1d0 [usbcore]
[ 243.149955] [<ffffffff81061960>] ? add_wait_queue+0x60/0x60
[ 243.150004] [<ffffffffa003e9d0>] ? hub_events+0x760/0x760 [usbcore]
[ 243.150026] [<ffffffff8106133e>] kthread+0x8e/0xa0
[ 243.150047] [<ffffffff8157ec04>] kernel_thread_helper+0x4/0x10
[ 243.150068] [<ffffffff810612b0>] ? flush_kthread_work+0x120/0x120
[ 243.150088] [<ffffffff8157ec00>] ? gs_change+0xb/0xb
[ 243.150101] Code: fd 41 54 53 48 83 ec 08 80 7f 1a 00 74 57 49 89 fc 31 db 90 49 8b 7c 24 20 45 31 f6 48 81 c7 10 02 00 00 e8 bc 64 f3 e0 49 89 c7 <4b> 8b 3c 37 49 83 c6 08 e8 4c a5 bd ff 49 83 fe 20
75 ed 45 30
[ 243.150257] RIP [<ffffffffa0468527>] stop_read_write_urbs+0x37/0x80 [usb_wwan]
[ 243.150282] RSP <ffff880037e75b30>
[ 243.150294] CR2: 0000000000000000
[ 243.177170] ---[ end trace fba433d9015ffb8c ]---

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Reported-by: Thomas Schäfer <tschaefer@t-online.de>
Suggested-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1937131a01c6ce37bb1d76617293d0d5a0cd66a7 15-Jul-2012 Bjørn Mork <bjorn@mork.no> USB: qcserial: adding Sierra Wireless devices

The QMI mode of the Sierra Wireless MC7710 is close to
a Gobi device, and also identified as one by the
Windows drivers provided by Sony. The serial interfaces
are the same as for any other Gobi module, but the USB
interface layout is different:

0: DM/DIAG (also present in bootloader mode)
2: NMEA
3: AT-capable modem port
8: QMI/net
19: QMI/net (not always present)
20: QMI/net (not always present)

Note in particular that the NMEA and AT ports are reversed
compared to a Gobi 2k+ device, and that the DM port appears
as a QDL port in bootloader mode using the same device ID.

The Sony driver also document two new devices with standard
Gobi 2k+ layout (1199:68a5, 1199:68a9) having a QDL mode
(1199:68a4, 1199:68a8). Adding these as well.

Lenovo Windows drivers document the USB interface layout
for a few additional Sierra Wireless devices. Adding these
while at it:
- MC7770 (1199:901b) with standard Gobi 2k+ layout
- MC7700 (0f3d:68a2) with the same layout as MC7710
- MC7750 (114f:68a2) with the same layout as MC7710
- EM7700 (1199:901c) with the same layout as MC7710

Cc: Anton Samokhvalov <pg83@yandex.ru>
Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
e7ad21e00eab6b77fb9b5cd79512b7dee473f476 15-Jul-2012 Bjørn Mork <bjorn@mork.no> USB: qcserial: support generic Qualcomm serial ports

No need to verify the interface layout when doing
interface number based matching. We can safely trust
the device ID table in this case.

This allows the driver to support any USB interface
layout for non-Gobi 1k/2k+ devices.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0dfbf65eb070a6dda535fcfec6028a7412698358 15-Jul-2012 Bjørn Mork <bjorn@mork.no> USB: qcserial: make probe more flexible

Preparing qcprobe support for more than just strict
Gobi 1k or 2k+ devices. Many newer Qualcomm based
devices provide the same serial ports, but using
varying USB interface layouts.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
d25d5f28828708b81658cff6f676b710c7ee171d 15-Jul-2012 Bjørn Mork <bjorn@mork.no> USB: qcserial: centralize probe exit path

Creating a common exit path from qcprobe to make it
easier to extend it.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2cf69930f03af63731678de79cb1dbe3547a5938 15-Jul-2012 Bjørn Mork <bjorn@mork.no> USB: qcserial: consolidate usb_set_interface calls

No need to replicate the same code all over the place.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
c41444ccfa33a1c20efa319e554cb531576e64a2 24-May-2012 Bjørn Mork <bjorn@mork.no> USB: qcserial: Add Sierra Wireless device IDs

Some additional IDs found in the BSD/GPL licensed out-of-tree
GobiSerial driver from Sierra Wireless.

Signed-off-by: Bjørn Mork <bjorn@mork.no>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
9760b28324f65cc1efc11326ded9bac9cbf49554 16-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: qcserial.c: remove dbg() usage

dbg() is a usb-serial specific macro. This patch converts
the qcserial.c driver to use dev_dbg() instead to tie into the
dynamic debug infrastructure.

CC: Thomas Tuttle <ttuttle@chromium.org>
CC: Alan Stern <stern@rowland.harvard.edu>
CC: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
68e24113457e437b1576670f2419b77ed0531e9e 09-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: rework usb_serial_register/deregister_drivers()

This reworks the usb_serial_register_drivers() and
usb_serial_deregister_drivers() to not need a pointer to a struct
usb_driver anymore. The usb_driver structure is now created dynamically
and registered and unregistered as needed.

This saves lines of code in each usb-serial driver. All in-kernel users
of these functions were also fixed up at this time. The pl2303 driver
was tested that everything worked properly.

Thanks for the idea to do this from Alan Stern.

Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Julia Lawall <julia@diku.dk>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Support Department <support@connecttech.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: William Greathouse <wgreathouse@smva.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
32078f915d1acab356080b144aa89fe3487f3979 07-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: remove usb_serial_disconnect call in all drivers

This is now set by the usb-serial core, no need for the driver to
individually set it.

Thanks to Alan Stern for the idea to get rid of it.

Cc: William Greathouse <wgreathouse@smva.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Support Department <support@connecttech.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Julia Lawall <julia@diku.dk>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
5026bb07be87ef5892742e6853ae6efa0f41961f 07-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: remove usb_serial_probe call in all drivers

This is now set by the usb-serial core, no need for the driver to
individually set it.

Thanks to Alan Stern for the idea to get rid of it.

Cc: William Greathouse <wgreathouse@smva.com>
Cc: Matthias Bruestle and Harald Welte <support@reiner-sct.com>
Cc: Lonnie Mendez <dignome@gmail.com>
Cc: Peter Berger <pberger@brimson.com>
Cc: Al Borchers <alborchers@steinerpoint.com>
Cc: Gary Brubaker <xavyer@ix.netcom.com>
Cc: Oliver Neukum <oliver@neukum.name>
Cc: Matthias Urlichs <smurf@smurf.noris.de>
Cc: Support Department <support@connecttech.com>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Mauro Carvalho Chehab <mchehab@redhat.com>
Cc: Kautuk Consul <consul.kautuk@gmail.com>
Cc: Bill Pemberton <wfp5p@virginia.edu>
Cc: Paul Gortmaker <paul.gortmaker@windriver.com>
Cc: Bart Hartgers <bart.hartgers@gmail.com>
Cc: Johan Hovold <jhovold@gmail.com>
Cc: Preston Fick <preston.fick@silabs.com>
Cc: Uwe Bonnes <bon@elektron.ikp.physik.tu-darmstadt.de>
Cc: Simon Arlott <simon@fire.lp0.eu>
Cc: Andrew Worsley <amworsley@gmail.com>
Cc: "Michał Wróbel" <michal.wrobel@flytronic.pl>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Felipe Balbi <balbi@ti.com>
Cc: Aleksey Babahin <tamerlan311@gmail.com>
Cc: Dan Carpenter <error27@gmail.com>
Cc: Jiri Kosina <jkosina@suse.cz>
Cc: Donald Lee <donald@asix.com.tw>
Cc: Julia Lawall <julia@diku.dk>
Cc: Michal Sroczynski <msroczyn@gmail.com>
Cc: Wang YanQing <Udknight@gmail.com>
Cc: Dan Williams <dcbw@redhat.com>
Cc: Thomas Tuttle <ttuttle@chromium.org>
Cc: Rigbert Hamisch <rigbert@gmx.de>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
Cc: Jesper Juhl <jj@chaosbits.net>
Cc: Adhir Ramjiawan <adhirramjiawan0@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
c7f3619b90fc4c43ed326ec8b3f0299374763c92 07-May-2012 Alan Stern <stern@rowland.harvard.edu> usb-serial: clean up unneeded PM-related fields

This patch (as1551) cleans up the PM-related entries in the usb_driver
structures of the various USB serial driver modules. Those entries
are now filled in by the usb-serial core during driver registration,
so they don't need to be initialized explicitly in the source code.

The same is true of the one remaining no_dynamic_id entry.

reset_resume remains a small problem, because the serial core doesn't
support it. The patch ignores these entries.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3a3eec0c1f3825398f76fa37c8fcba58c770e0d7 04-May-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: qcserial.c: remove dbg() tracing calls

dbg() was used a lot a long time ago to trace code flow. Now that we have
ftrace, this isn't needed at all, so remove these calls.

CC: Thomas Tuttle <ttuttle@chromium.org>
CC: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
CC: Rigbert Hamisch <rigbert@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3d8d7296f7dbc7c977b8552dcfa649817d91d24c 28-Feb-2012 Greg Kroah-Hartman <gregkh@linuxfoundation.org> USB: serial: qcserial.c: use module_usb_serial_driver

This converts the qcserial.c driver to use the module_usb_serial_driver() call
instead of having to have a module_init/module_exit function, saving a lot
of duplicated code.

CC: Steven Hardy <shardy@redhat.com>
CC: Thomas Tuttle <ttuttle@chromium.org>
CC: Paul Gortmaker <paul.gortmaker@windriver.com>
CC: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
c192c8e71a2ded01170c1a992cd21aaedc822756 24-Feb-2012 Dan Williams <dcbw@redhat.com> USB: qcserial: don't grab QMI port on Gobi 1000 devices

Gobi 1000 devices have a different port layout, which wasn't respected
by the current driver, and thus it grabbed the QMI/net port. In the
near future we'll be attaching another driver to the QMI/net port for
these devices (cdc-wdm and qmi_wwan) so make sure the qcserial driver
doesn't claim them. This patch also prevents qcserial from binding to
interfaces 0 and 1 on 1K devices because those interfaces do not
respond.

Signed-off-by: Dan Williams <dcbw@redhat.com>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
d860322f34e4a53f347b1aeae23d5b72f1e91b8c 23-Feb-2012 Alan Stern <stern@rowland.harvard.edu> usb-serial: use new registration API in [q-s]* drivers

This patch (as1528) modifies the following usb-serial drivers to
utilize the new usb_serial_{de}register_drivers() routines:

qcaux, qcserial, safe_serial, siemens_mpi, sierra,
spcp8x5, ssu100, and symbolserial.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
0a365706f2d6062d3756806447c1bbcd7e315ffa 01-Feb-2012 Thomas Tuttle <ttuttle@chromium.org> USB: qcserial: don't enable autosuspend

We've found that qcserial devices will not always wake up reliably
from autosuspend, so disable it.

Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2db4d87070e87d198ab630e66a898b45eff316d9 01-Feb-2012 Thomas Tuttle <ttuttle@chromium.org> USB: qcserial: add several new serial devices

Signed-off-by: Thomas Tuttle <ttuttle@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
90ab5ee94171b3e28de6bb42ee30b527014e0be7 13-Jan-2012 Rusty Russell <rusty@rustcorp.com.au> module_param: make bool parameters really bool (drivers & misc)

module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.

It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.

Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
6eb0de827084060e6607c8f8542d9e9566214538 03-Jul-2011 Paul Gortmaker <paul.gortmaker@windriver.com> usb: Add module.h to drivers/usb consumers who really use it.

The situation up to this point meant that module.h was pretty
much everywhere, regardless of whether you asked for it or not.
We are fixing that, so give the USB folks who want it an actual
include of it.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
1bfac90d1b8e63a4d44158c3445d8fda3fb6d5eb 27-Sep-2011 Rigbert Hamisch <rigbert@gmx.de> USB: qcserial: add device ID for "HP un2430 Mobile Broadband Module"

add device ID for "HP un2430 Mobile Broadband Module"

Signed-off-by: Rigbert Hamisch <rigbert@gmx.de>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
68c79e5756903229fa96826a2493c2265a3b395f 20-Sep-2011 Richard Hartmann <richih.mailinglist@gmail.com> USB: qcserial: Add support for Sierra Wireless MC8355/Gobi 3000

Simple patch to make qcserial recognize the USB id of the Sierra
Wireless MC8355 which is based on the Gobi 3000 chip.

Both UMTS and GPS work fine.

Signed-off-by: Richard Hartmann <richih.mailinglist@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2f1def2695c223b2aa325e5e47d0d64200a45d23 09-Aug-2011 Florian Echtler <floe@butterbrot.org> USB: Serial: Add device ID for Sierra Wireless MC8305

A new device ID pair is added for Sierra Wireless MC8305.

Signed-off-by: Florian Echtler <floe@butterbrot.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
e468561739fffb972d486b98f66c723936335136 08-Aug-2011 Vijay Chavan <vijaychavan007@gmail.com> USB: Serial: Added device ID for Qualcomm Modem in Sagemcom's HiLo3G

A new device ID pair is added for Qualcomm Modem present in Sagemcom's HiLo3G module.

Signed-off-by: Vijay Chavan <VijayChavan007@gmail.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
cb62d65f966146a39fdde548cb474dacf1d00fa5 04-Apr-2011 Steven Hardy <shardy@redhat.com> usb: qcserial add missing errorpath kfrees

There are two -ENODEV error paths in qcprobe where the allocated private
data is not freed, this patch adds the two missing kfrees to avoid
leaking memory on the error path

Signed-off-by: Steven Hardy <shardy@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
99ab3f9e4eaec35fd2d7159c31b71f17f7e613e3 04-Apr-2011 Steven Hardy <shardy@redhat.com> usb: qcserial avoid pointing to freed memory

Rework the qcprobe logic such that serial->private is not set when
qcprobe exits with -ENODEV, otherwise serial->private will point to freed
memory on -ENODEV

Signed-off-by: Steven Hardy <shardy@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
10c9ab15d6aee153968d150c05b3ee3df89673de 04-Apr-2011 Steven Hardy <shardy@redhat.com> usb: Fix qcserial memory leak on rmmod

qcprobe function allocates serial->private but this is never freed, this
patch adds a new function qc_release() which frees serial->private, after
calling usb_wwan_release

Signed-off-by: Steven Hardy <shardy@redhat.com>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
1992de83e375acc789daf66b7b72a812a5235b75 24-Sep-2010 Matthias G. Eckermann <mge@arcor.de> USB: qcserial: Enable Diagnostics Monitor and GPS ports on Gobi 2000

this patch to qcserial.c enables the Diagnostics Monitor
and NMEA GPS ports on Qualcomm Gobi 2000 devices.

A Gobi 2000 device will provide 3 serial ports:
# /dev/ttyUSB0 -> Diagnostics
# /dev/ttyUSB1 -> 3G Modem
# /dev/ttyUSB2 -> NMEA GPS port

* The Diagnostics Monitor uses Qualcomm's DM protocol; I used
libqcdm (ModemManager) to talk to it, found it working, but at
least DM commands 12 and 64 are not implemented on my device
(Gobi 2000 built into Thinkpad x100e).

* Functionality of the 3G Modem port remains unchanged.

* The GPS port and how to enable it has been confirmed now in the
Gobi 3000 source code at:
https://www.codeaurora.org/patches/quic/gobi/
Enable/disable GPS via:
echo "\$GPS_START" > /dev/ttyUSB2
# use GPS
echo "\$GPS_STOP" > /dev/ttyUSB2


Signed-off-by: Matthias G. Eckermann <mge@arcor.de>
1f8dd0154e09220be346819b85d195c791bb0f0b 16-Sep-2010 Matthew Garrett <mjg@redhat.com> USB: serial: Enable USB autosuspend by default on qcserial

Seems to work fine in my testing.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
bec25b891e08fe364f329b045a3566422ca372ec 01-Jul-2010 Andrew Bird <ajb@spheresytems.co.uk> USB: New PIDs for Qualcomm gobi 2000 (qcserial)

Adds support for the Generic Qualcomm Gobi 2000 WWAN UMTS/CDMA modem

Signed-off-by: Andrew Bird <ajb@spheresytems.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
0d152de56938361fa2b960db67657b20cdaa6d84 21-Jun-2010 Axel Lin <axel.lin@gmail.com> USB: qcserial: fix a memory leak in qcprobe error path

This patch adds missing kfree(data) before return -ENODEV.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
e07896e62abbf7a741a5cd5b25ba7637bdf91ad0 01-Apr-2010 Anssi Hannula <anssi.hannula@gmail.com> USB: qcserial: Add support for Qualcomm Gobi 2000 devices

Add ids for Qualcomm Gobi 2000 QDL and Modem modes. Gobi 2000 has a
single altsetting in QDL mode, so adapt code to handle that.

Firmware upload protocol is also slightly different, with an
additional firmware file. However, qcserial doesn't handle firmware
uploading.

Tested on Lenovo Thinkpad T510.

Signed-off-by: Anssi Hannula <anssi.hannula@gmail.com>
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
3d7e59ad88fdb6bc50ae9b7e822d4bb5f68b68f9 01-Apr-2010 Matthew Garrett <mjg@redhat.com> USB: qcserial: Use generic USB wwan code

Make qcserial use the generic USB wwan code. This should result in a
performance improvement.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
0725e95ea56698774e893edb7e7276b1d6890954 10-Mar-2010 Bernhard Rosenkraenzer <br@blankpage.ch> USB: qcserial: add new device ids

This patch adds various USB device IDs for Gobi 2000 devices, as found in the
drivers available at https://www.codeaurora.org/wiki/GOBI_Releases

Signed-off-by: Bernhard Rosenkraenzer <bero@arklinux.org>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
7d40d7e85a25e01948bcb4dc3eda1355af318337 10-Jan-2010 Németh Márton <nm127@freemail.hu> USB serial: make USB device id constant

The id_table field of the struct usb_device_id is constant in <linux/usb.h>
so it is worth to make the initialization data also constant.

The semantic match that finds this kind of pattern is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@r@
disable decl_init,const_decl_init;
identifier I1, I2, x;
@@
struct I1 {
...
const struct I2 *x;
...
};
@s@
identifier r.I1, y;
identifier r.x, E;
@@
struct I1 y = {
.x = E,
};
@c@
identifier r.I2;
identifier s.E;
@@
const struct I2 E[] = ... ;
@depends on !c@
identifier r.I2;
identifier s.E;
@@
+ const
struct I2 E[] = ...;
// </smpl>

Signed-off-by: Németh Márton <nm127@freemail.hu>
Cc: Julia Lawall <julia@diku.dk>
Cc: cocci@diku.dk
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
f05932c0caf40c43af8a2c21adf7c46a00c436c4 04-Apr-2009 Matthew Garrett <mjg59@srcf.ucam.org> USB: qcserial: Add extra device IDs

Add a set of device IDs from the Windows drivers. These aren't complete
(there's a couple of cases where a QDL device is identified without the
associated modem being identified), but it's better than the current
situation.

Signed-off-by: Matthew Garrett <mjg@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fd8345f8dea93691b0ceba55146088d8c05415f6 21-Mar-2009 Alexander Shumakovitch <shurik@gwu.edu> USB: qcserial: add device id for HP devices

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
a78b42824dd7c2b40d72fb01f1b1842f7e845f3a 18-Feb-2009 Greg Kroah-Hartman <gregkh@suse.de> USB: serial: add qualcomm wireless modem driver

Driver originally written by Qualcomm, but rewritten by me due to the
totally different coding style. Cleaned up the probe logic to make a
bit more sense, this is one wierd device. They could have prevented all
of this by just writing sane firmware for the modem.

Cc: Tamm Liu <tamml@qualcomm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>