Commit Graph

618 Commits

Author SHA1 Message Date
Elly Jones c831028555 gobi3k-sdk: Add GetDeviceType()
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>
2011-07-12 16:29:33 -05:00
Elly Jones 05c2833731 gobi3k-sdk: Use lock instead of trylock
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
2011-07-12 16:22:14 -05:00
Elly Jones 454be50636 gobi3k-sdk: Fix UpdateFirmware()
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
2011-07-12 16:21:19 -05:00
Elly Jones 9abb5a0911 gobi3k-sdk: add -lpthreads to GobiQDLService makefile
This placates gold.

BUG=None
TEST=Adhoc
Built.

Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: raymes <raymes@google.com>

Review URL: https://chromereviews.googleplex.com/2686017
2011-07-12 16:18:05 -05:00
Dan Williams c3f7bb3142 gobi: add GobiQDLService files
When I created the 'fixed' directory these didn't get added due to
the erroneous .gitignore.
2011-07-12 16:17:06 -05:00
Dan Williams 12fb080170 trivial: stop ignoring the whole GobiQDLService directory 2011-07-12 16:14:59 -05:00
Elly Jones 58e622b754 gobi3k-sdk: Always supply -lpthread to placate gold
BUG=None
TEST=Adhoc
Built.

Signed-off-by: Chris Masone <cmasone@google.com>
Signed-off-by: Elly Jones <ellyjones@google.com>

Review URL: https://chromereviews.googleplex.com/2691013
2011-07-12 16:12:11 -05:00
Elly Jones b4379c69b2 gobi3k-sdk: QDL: search by driver, not vid:pid
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
2011-07-12 16:07:58 -05:00
Elly Jones 07e34abc7d Install Gobi headers
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
2011-07-12 16:06:31 -05:00
Elly Jones 283c2d4971 Support all gobi devices.
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
2011-07-12 15:56:56 -05:00
Dan Williams cc95d8fdda gobi: CodeAurora stuff is BSD, not GPLv3 like autotools thinks the world should be 2011-07-12 13:52:59 -05:00
Dan Williams 254f647f1b gobi: duplicate upstream GobiAPI so we can change it 2011-07-12 13:23:09 -05:00
Dan Williams 5f0ca4eb56 gobi: add dummy C file for database static lib
I don't know the autotools magic for building a lib from only
precompiled .o files, so lets do it this way instead.
2011-07-11 20:24:24 -05:00
Dan Williams 9c7e07cea9 gobi: ensure m4/ directory is created or autogen.sh bails 2011-07-11 20:24:04 -05:00
Dan Williams 7c2e0be62d core: add .gitignore file 2011-07-11 20:21:01 -05:00
Dan Williams eca93cf1ed gobi: remove hand-rolled makefiles 2011-07-11 20:17:48 -05:00
Dan Williams f9aa19c63f gobi: autotool everything 2011-07-11 20:17:14 -05:00
Dan Williams c91eb07bcf gobi: initial commit of CodeAurora Gobi SDK 2011-07-11 20:12:48 -05:00