This function returns the type of device we're connected to, which allows us to
decide whether to use the 2K or 3K firmware download API.
BUG=chromium-os:15295
TEST=Adhoc
Hack gobi-cromo-plugin to log the result of GetDeviceType() and grep for that.
Change-Id: Ib8dad138e67e003dbf55b5ffc912241da70d3d75
Signed-off-by: Elly Jones <ellyjones@google.com>
Reviewed-on: https://gerrit-int.chromium.org/1410
Reviewed-by: Jason Glasgow <jglasgow@google.com>
Trylock appears to be used here as part of some kind of fancy-but-unnecessary
deadlock-detection system; we're better off just writing deadlock-free code to
begin with.
The trylock-using code was losing events; if it tried to get the lock and
failed, it'd drop the incoming event on the floor, which means response latency
would nondeterministically spike up to the max timeout (thus the test failures
with timeout = 1000 instead of 100). If we just wait until the lock is free,
we'll never discard events. Go us.
(This also makes the timeout unnecessary in most cases, but I have not removed
it in this CL yet.)
BUG=chromium-os:13475
TEST=network_3GStressEnable
Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: Jason Glasgow <jglasgow@google.com>
Review URL: https://chromereviews.googleplex.com/2727013
UpdateFirmware() was trying to use the gobi 3000 firmware download protocol (and
gobi 3000 firmware images) to download gobi 2000 firmware onto a gobi 2000
device. Oops.
BUG=None
TEST=Adhoc
With gobi2k, modem_set_carrier; with gobi3k, gobi-fw.
Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: Jason Glasgow <jglasgow@google.com>
Review URL: https://chromereviews.googleplex.com/2707019
Being able to set the vid:pid was always a bad hack to allow us to start working
on gobi3k support; the proper way to do this is to look for ports by driver
name. This also lets us chop out a bunch of code, which is always fun.
As a side-effect, GobiEnumerateQDLDevices() really returns *all* QDL devices,
not just those that match the current vid:pid.
BUG=chromium-os:12380
TEST=Adhoc
Using the 'gobi-fw' tool from gobi3k-lib (not yet committed): gobi-fw list
Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: David Rochberg <rochberg@google.com>
Review URL: https://chromereviews.googleplex.com/2657021
As part of this, remove the double definitions of the builtin types.
BUG=chromium-os:12380
TEST=Adhoc
install and gobi3k image-list; also ls /usr/include/gobi.
Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: Jason Glasgow <jglasgow@google.com>
Review URL: https://chromereviews.googleplex.com/2627017
1) Use the ioctl() supplied by the unified kernel driver;
2) Instead of looking for the device by vid:pid (?), look for it by owning
driver.
BUG=chromium-os:12380
TEST=Adhoc
shim ebuild + emerge-$board gobi3k-sdk
Plug in a G3K, `modem status`; plug in a G2K, `modem status`.
Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: Jason Glasgow <jglasgow@google.com>
Review URL: https://chromereviews.googleplex.com/2647025