CHROMIUM: gobi: resubmit interrupt urb on failed reads

If we don't do this and there are pending reads when the card suspends, we can
fail to re-request interrupt urbs when the card comes back up, and we fall into
a hole. Oops.

BUG=None
TEST=Adhoc
suspend/resume a few times; make sure 'modem status' is sensible after each.

Change-Id: Ia0e1b96e983249113c1e1dbf35490487f60a205c
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>

Review URL: http://codereview.chromium.org/6731086
(cherry picked from commit 900b6e1c5881ba4f9badb0a584ee466458e3c375)

CHROMIUM: Hide packet dumps behind a flag.

BUG=None
TEST=Adhoc
built, installed, dmesg | grep gobi, modem status

Change-Id: Ic9152dad864d4125204620b7f93b1170cf0d7159
Signed-off-by: Elly Jones <ellyjones@chromium.org>

Review URL: http://codereview.chromium.org/6731002
(cherry picked from commit 3288bce5d87f5fff3dfadc09668038e173069b9d)

CHROMIUM: gobi: Fix races in qc_deregister() once and for all.

This is a fix to my rewritten driver, and is ported from the fix at http://codereview.chromium.org/6602058/.

Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>

BUG=chromium-os:10342
TEST=/opt/Qualcomm/bin/open-deauth

Review URL: http://codereview.chromium.org/6612045

Change-Id: I404edbfde49a154604bc657b7f76776b7423f51e
(cherry picked from commit 41b9938a183c1f5c84d27c717f6e8556054271f5)

CHROMIUM: qcusbnet: Add gobi3k support.

This entails:
1) Adding a couple of new vid:pid pairs for known Gobi3k devices.
2) Handling the extra USB interface gobi3ks have
3) Installing a proper 'parent' pointer to help udev emit the correct number of
   device events, and
4) Changing the driver's registration name.

The latter change was requested by upstream when I first submitted this driver.
It is correct, in that the driver's name should reflect that it does not just
drive gobi2ks, but it will require changes in userspace to match.

BUG=chromium-os:12380
TEST=Adhoc
ls /dev/qcqmi* with both a g2k and g3k present; try 'gobi3k list', too.

Change-Id: I0e86fcbce22f3a1f3fd58caf0e8d47e39a1af9ed
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>

Review URL: http://codereview.chromium.org/6672003
(cherry picked from commit b4fd3f92bdb53f0a47b3a2d31425e62c700900df)

CHROMIUM: qcusbnet: fix devqmi_close() races.

Originally, devqmi_close() was attached to the flush hook (instead of the
release hook), meaning it would be called whenever a userspace task called
close() (instead of just when the last ref to the file was dropped), which
necessitated the task-list-walking song and dance. Instead, add a new ioctl
which userspace can use to tear down the QMI connection and remove the refcount
check stuff.

This fixes a whole raft of nasty races in devqmi_close().

Note that it is not required that userspace use the ioctl; if it doesn't
(because, for example, it crashes), we'll still clean up any dangling QMI
contexts at release time.

BUG=chromium-os:10360
TEST=Adhoc
Reproducing the bug this fixes (see 10360) is almost impossible. :(

Change-Id: Ic64f64d89757f2ad95d2df9e8da04ddda3209bda
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Signed-off-by: Mandeep Singh Baines <msb@chromium.org>

Review URL: http://codereview.chromium.org/6694028
(cherry picked from commit 4b00239a9ecc343ed9a8aee9cb753fe19ac88917)

CHROMIUM: qcusbnet: don't leak clients_lock

Was present in the original qualcomm driver; we reported it to them and they
fixed it, but we didn't pull the fix into the rewrite. Oops.

BUG=None
TEST=Adhoc
'gobi3k reset' with a gobi3k present triggers this most of the time.

Change-Id: I02bd90fd17bec841a8d448507e2f8117f57e8328
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>

Review URL: http://codereview.chromium.org/6695025
(cherry picked from commit fada8abe8cc60f45520bdec78a7a8f6bbf706bb1)

CHROMIUM: Add gobi driver.

(It isn't built yet, so this should have no functional changes at all).

BUG=chromium-os:5521
TEST=suite_Cellular

Change-Id: I28bc550bd600ba350f8b34926e698bbb2b3c8c6c
Signed-off-by: Elly Jones <ellyjones@chromium.org>
Signed-off-by: Jason Glasgow <jglasgow@chromium.org>
Signed-off-by: Olof Johansson <olofj@chromium.org>

Review URL: http://codereview.chromium.org/6539018
(cherry picked from commit 7e3365245483506d389c21d1074252a41efbcf68)

Review URL: http://codereview.chromium.org/6822058
(cherry picked from commit ff3fb27d776b6f7dbcdc0db8bc8d9901a6cfed4e)
4 files changed