chromiumos/third_party/gobi3k-sdk.git
18 months agoFix clang syntax warning. 75/47675/2 factory-4128.B factory-4290.B factory-4455.B factory-pit-4280.B factory-pit-4390.B factory-pit-4471.B factory-spring-4131.B factory-spring-4262.B firmware-falco_peppy-4389.B firmware-leon-4389.26.B firmware-pit-4482.B firmware-wolf-4389.24.B master release-R28-4100.B release-R29-4319.B release-R30-4537.B stabilize-4035.0.B stabilize-4068.0.B stabilize-4100.38.B stabilize-4255.B stabilize-4287.B stabilize-4443.B stabilize-4512.B stabilize-spring-4100.53.B toolchainB
Yunlian Jiang [Tue, 9 Apr 2013 19:34:11 +0000 (12:34 -0700)]
Fix clang syntax warning.

The error message is
In file included from ../Core/CoreDatabase.cpp:30:
../Core/CoreDatabase.h:1545:26: error: read-only variable is not assignable
               *pRefCats = -1;
               ~~~~~~~~~ ^
std::set is an ordered data structure, directly change one of the element
may destroy the order, it's dangerous.

BUG=chromium:219559
TEST=CFLAGS="-clang -print-cmdline" CXXFLAGS="-clang -print-cmdline"
     emerge-x86-alex gobi3k-sdk passes.

Change-Id: I4e5f0a01cc920e81e8a3484e85111b1a00d3c7f4
Reviewed-on: https://gerrit.chromium.org/gerrit/47675
Reviewed-by: Han Shen <shenhan@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>
Tested-by: Yunlian Jiang <yunlian@chromium.org>
Commit-Queue: Yunlian Jiang <yunlian@chromium.org>

20 months agoMake cProtocolServerRxCallback inherited from cIOCallback. 19/42819/2 factory-spring-3842.B firmware-spring-3824.4.B firmware-spring-3824.55.B firmware-spring-3824.84.B firmware-spring-3824.B firmware-spring-3833.B release-R26-3701.B release-R27-3912.B stabilize-3701.30.0 stabilize-3701.30.0b stabilize-3701.46.B stabilize-3701.81.B stabilize-3881.0.B stabilize-3912.79.B stabilize-4008.0.B stabilize-bluetooth-smart toolchain-3701.42.B toolchainA
Ben Chan [Thu, 7 Feb 2013 00:28:38 +0000 (16:28 -0800)]
Make cProtocolServerRxCallback inherited from cIOCallback.

BUG=chromium-os:38694
TEST=`emerge-lumpy gobi3k-sdk cromo gobi-cromo-plugin`

Change-Id: I77440b90c6f5e457b3f263a9a379793312f88c12
Reviewed-on: https://gerrit.chromium.org/gerrit/42819
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
21 months agoAdd Sierra MC8355 Gobi modem support. 35/42135/3 stabilize-3658.0.0
Shawn Nematbakhsh [Mon, 28 Jan 2013 20:25:09 +0000 (12:25 -0800)]
Add Sierra MC8355 Gobi modem support.

BUG=chrome-os-partner:17480.
TEST=manual. Verify modem is visible in Chrome OS network manager.

Change-Id: I44ac38bb01b61560f3db189a36c65b29a5f26e12
Reviewed-on: https://gerrit.chromium.org/gerrit/42135
Reviewed-by: Ben Chan <benchan@chromium.org>
Tested-by: Shawn Nematbakhsh <shawnn@chromium.org>
Commit-Queue: Shawn Nematbakhsh <shawnn@chromium.org>

2 years agoPrevent NULL dereferencing in ProtocolServer factory-3536.B release-R25-3428.B stabilize-3428.110.0 stabilize-3428.149 stabilize-3428.149.B stabilize-3428.193 stabilize2 toolchain-3428.65.B
Arman Uguray [Mon, 8 Oct 2012 18:06:39 +0000 (11:06 -0700)]
Prevent NULL dereferencing in ProtocolServer

Crash due to NULL dereferencing in ProtocolServer. Added guard that
checks for NULL before dereferencing the pointer.

BUG=chromium-os:34957
TEST=I observed this crash repeatedly during suspend_stress_test. Wrote
a script that runs suspend_stress_test and runs cromo via valgrind repeatedly
and logs valgrind output when valgrind exits. Ran this script over the
weekend and observed no invalid access.

Change-Id: I260df3051b29ff871deb35f51abf85b5af6f0491
Reviewed-on: https://gerrit.chromium.org/gerrit/34901
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Ready: Arman Uguray <armansito@chromium.org>
Tested-by: Arman Uguray <armansito@chromium.org>
2 years agoFree memory allocated by scandir as soon as it isn't needed. factory-2985.B factory-3004.B
Ben Chan [Tue, 2 Oct 2012 20:18:10 +0000 (13:18 -0700)]
Free memory allocated by scandir as soon as it isn't needed.

BUG=chromium-os:34958
TEST=Run suspend_stress_test on a system with a Gobi modem.

Change-Id: Iece374eb205defc092b82c6bc4f26c7730004bf4
Reviewed-on: https://gerrit.chromium.org/gerrit/34439
Reviewed-by: Thieu Le <thieule@chromium.org>
Commit-Ready: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
2 years agoAdd Option GTM681W and GTM689W Gobi modem support. 61/27761/2 factory-2717.B factory-2723.14.B factory-2846.B factory-2848.B factory-2914.B firmware-butterfly-2788.B firmware-link-2695.2.B firmware-link-2695.B firmware-parrot-2685.B firmware-snow-2695.90.B firmware-snow-2695.B firmware-stout-2817.B release-R22-2723.B
Ben Chan [Wed, 27 Jun 2012 16:55:06 +0000 (09:55 -0700)]
Add Option GTM681W and GTM689W Gobi modem support.

BUG=chrome-os-partner:11513
TEST=Manually tested with Option GTM681W and GTM689W modem.

Change-Id: Icc95b5b884ae8ea3701acea104687ad6754e3e15

2 years agoFixed gcc-4.7 build for gobi3k-sdk. 32/27332/1
Han Shen [Thu, 12 Jul 2012 23:06:12 +0000 (16:06 -0700)]
Fixed gcc-4.7 build for gobi3k-sdk.

TEST=built using gcc-4.7
BUG=None

Change-Id: I54262e27241cf946aa4a63baa7186d686a667216

2 years agogobi: move open source gobi programs to open sdk 46/17346/1 factory-1987.B factory-2268.16.B factory-2305.B factory-2338.B factory-2368.B factory-2394.B factory-2460.B factory-2475.B factory-2569.B firmware-link-2348.B release-R19-2046.B release-R20-2268.B release-R21-2465.B
Elly Jones [Mon, 5 Mar 2012 20:51:56 +0000 (15:51 -0500)]
gobi: move open source gobi programs to open sdk

Move the Google written programs from the Qualcomm propriteary
repository to the open source gobi3-sdk.

This requires a corresponding CL to remove them from the qualcomm-sdk repository.

These files were moved in a non-history preserving way.

BUG=chrome-os-partner:7154
TEST=install, run powercycle-all-gobis

Change-Id: Id94c4725d780b31ad89069bb027626938b9fa42e

2 years agoComm: Use the old style async i/o instead of select 33/13433/1 release-R18-1660.B
Jason Glasgow [Thu, 22 Dec 2011 21:28:22 +0000 (16:28 -0500)]
Comm: Use the old style async i/o instead of select

Use the old style async i/o thread to read from the qmi file
descriptors because the implementation using select appears to be
buggy.  The suspend resume test frequently gets a segmentation
violation within the gobi sdk, and even when code is modified to
mitigate that problem, we have had several kernel crashes.  Moving
back to the async I/O thread until bugs with select can be addressed.

BUG=chromium-os:24474
TEST=network_3g, especially SuspendResume

Change-Id: I3abc8518c2554f08861662b27e0411d70a372320

2 years agoDepthSearch: fix leaks from using scandir 15/13415/2
Jason Glasgow [Thu, 22 Dec 2011 17:34:07 +0000 (12:34 -0500)]
DepthSearch: fix leaks from using scandir

Fix leaks associated with using scandir

BUG=chromium-os:24511
TEST=run cromo under valgrind

Change-Id: I2051407d25a0171be4e57bc61d0d7a6fb366edff

2 years agogobi3k-sdk: add -fPIC flag to compilation 34/13234/1
Jason Glasgow [Tue, 20 Dec 2011 17:02:32 +0000 (12:02 -0500)]
gobi3k-sdk: add -fPIC flag to compilation

add -fPIC flag to compilation

BUG=none
TEST=run cromo

Change-Id: I11ef3f555f8f7efe3291a63cc97fdeb480f2163d

2 years agoCHROMIUM: Stop reading when a device disappears. 76/13176/2
Jason Glasgow [Wed, 20 Jul 2011 20:23:36 +0000 (16:23 -0400)]
CHROMIUM: Stop reading when a device disappears.

Instaed of forever rescheduling reads when a device disappears,
recognize errors that are unrecoverable and immediately fail the read
operation.

BUG=chrome-os-partner:4832
TEST=Connect, get failure to connect, disable, enable.  everything should work

Change-Id: I8238f3f17491807e6b497ab5d87d814e339e574f
Reviewed-on: https://gerrit-int.chromium.org/3372
Reviewed-by: Eric Shienbrood <ers@google.com>
Tested-by: Jason Glasgow <jglasgow@google.com>
2 years agoCHROMIUM: Send log messages to syslog 75/13175/2
Jason Glasgow [Mon, 11 Jul 2011 19:20:28 +0000 (15:20 -0400)]
CHROMIUM: Send log messages to syslog

Send log messages to syslog so they can be controlled by setting the
logging mask.  This is compiled in for builds that are do not define
NDEBUG.

BUG=none
TEST=dbus-send --print-reply --system --dest=org.cromo.ModemManager /org/cromo/ModemManager org.freedesktop.ModemManager.SetLogging debug

Change-Id: I9b59207365fc110106685c679c46fb56dcca757a
Reviewed-on: https://gerrit-int.chromium.org/3056
Tested-by: Jason Glasgow <jglasgow@google.com>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Reviewed-by: Elly Jones <ellyjones@google.com>
2 years agoMerge new gobi3k SDK. 74/13174/2
ttuttle [Fri, 3 Jun 2011 20:44:59 +0000 (16:44 -0400)]
Merge new gobi3k SDK.

BUG=chromium-os:16108
TEST=network_3GSmokeTest passes, some of the time.

Change-Id: I622de3f146912e0788da45e463b9ea75da6f8884
Reviewed-on: https://gerrit-int.chromium.org/2659
Reviewed-by: Jason Glasgow <jglasgow@google.com>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agoFix bugs found in security audit of gobi3k-sdk 73/13173/2
Jason Glasgow [Mon, 19 Dec 2011 21:32:25 +0000 (16:32 -0500)]
Fix bugs found in security audit of gobi3k-sdk

BUG=chrome-os-partner:4395
TEST=Adhoc

Change-Id: I59049f90231140838064986ecd8c8d8720785820
Reviewed-on: https://gerrit-int.chromium.org/2051
Reviewed-by: Elly Jones <ellyjones@google.com>
Reviewed-by: Jason Glasgow <jglasgow@google.com>
Reviewed-by: ttuttle <ttuttle@chromium.org>
Tested-by: ttuttle <ttuttle@chromium.org>
2 years agogobi3k-sdk: fix GetDeviceType() on Novatel Gobi 2000. 72/13172/2
Elly Jones [Thu, 26 May 2011 15:47:00 +0000 (11:47 -0400)]
gobi3k-sdk: fix GetDeviceType() on Novatel Gobi 2000.

GetDeviceType() misinterpreted the wildcard marker for Novatel's gobi 2k in the
list of devices, causing it to falsely return unknown.

BUG=chromium-os:15790
TEST=Adhoc
modem_set_carrier with a Novatel gobi 2k

Change-Id: I79ad1f7b1923adfa5f2345a3f2e46a97d5ddd5e7
Signed-off-by: Elly Jones <ellyjones@google.com>
Reviewed-on: https://gerrit-int.chromium.org/1764
Reviewed-by: Jason Glasgow <jglasgow@google.com>
2 years agogobi3k-sdk: Add GetDeviceType(). 71/13171/2
Elly Jones [Mon, 16 May 2011 20:47:47 +0000 (16:47 -0400)]
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>
2 years agoFix W&X for g3k sdk 70/13170/2
David Rochberg [Mon, 11 Apr 2011 18:42:54 +0000 (14:42 -0400)]
Fix W&X for g3k sdk

Resurrect the g2k SDK hack for linking the database files with .note.GNU-stack so that we don't end up with W&X segments

BUG=chromium-os:13357
TEST=all working tests from suite_cellular

Review URL: https://chromereviews.googleplex.com/2737019

Change-Id: Ic747fc48acf24b5e4d4c32fe7f9c7aeba455d478

2 years agogobi3k-sdk: Use lock instead of trylock. 69/13169/2
Elly Jones [Mon, 4 Apr 2011 21:07:13 +0000 (17:07 -0400)]
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

Change-Id: Id0e8c89f03da8a4fe7d21606664de58c3593a8cf

2 years agogobi3k-sdk: Fix UpdateFirmware(). 68/13168/2
Elly Jones [Fri, 1 Apr 2011 16:23:54 +0000 (12:23 -0400)]
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

Change-Id: I7ee2904565e0f473f259ec510b415e9e3a59356d

2 years agogobi3k-sdk: add -lpthreads to GobiQDLService makefile. 67/13167/2
Elly Jones [Wed, 23 Mar 2011 22:22:12 +0000 (18:22 -0400)]
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

Change-Id: I549267bf4ff788d4cc2c7f854b0309787a5bc954

2 years agogobi3k-sdk: Always supply -lpthread to placate gold. 66/13166/2
Elly Jones [Tue, 22 Mar 2011 20:48:04 +0000 (16:48 -0400)]
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

Change-Id: Ic07bb142015215160dc1a4917f4341966c802019

2 years agogobi3k-sdk: QDL: search by driver, not vid:pid 65/13165/2
Jason Glasgow [Mon, 19 Dec 2011 21:10:49 +0000 (16:10 -0500)]
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
Change-Id: I28ca11310754bb71ac6038fbca987e05dd5b5d96

2 years agoInstall Gobi headers. 64/13164/2
Jason Glasgow [Mon, 19 Dec 2011 21:08:27 +0000 (16:08 -0500)]
Install Gobi headers.

As part of this, remove the double definitions of the builtin types. Also, fix a
linking failure in QMIDB.o (oops).

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

Conflicts:

GobiConnectionMgmt/GobiConnectionMgmtAPI.h
GobiConnectionMgmt/Makefile
GobiImageMgmt/GobiImageMgmtAPI.h
GobiImageMgmt/Makefile

Change-Id: I548129251f4b6aff4df45ffcb6fdd6674ea9a6da

2 years agoSupport all gobi devices. 63/13163/2
Jason Glasgow [Mon, 19 Dec 2011 21:06:03 +0000 (16:06 -0500)]
Support all gobi devices.

Several changes involved:
1) Move the location where the connectionmgmt and imagemgmt libraries are
installed so that gobi3k-lib can link against them;
2) Use the ioctl() supplied by the unified kernel driver;
3) 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

Conflicts:

GobiConnectionMgmt/Makefile
codereview.settings

Change-Id: I156aac30d9ceec05db7c02e5dcdb01590c075482

2 years agoPrevent gratuitous rebuilds. 62/13162/2
Jason Glasgow [Mon, 19 Dec 2011 21:01:00 +0000 (16:01 -0500)]
Prevent gratuitous rebuilds.

BUG=chromium-os:12380
TEST=Adhoc
emerge-$board gobi3k-sdk, with a shim ebuild.

Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: Jason Glasgow <jglasgow@google.com>
Review URL: https://chromereviews.googleplex.com/2625034

Conflicts:

GobiConnectionMgmt/Makefile
GobiImageMgmt/Makefile

Change-Id: I458eb583144dc6e69981b3569a598382d17a16be

2 years agoMade source build. 44/13144/3
Jason Glasgow [Mon, 19 Dec 2011 19:56:21 +0000 (14:56 -0500)]
Made source build.

BUG=chromium-os:12380
TEST=Adhoc
Wrote a shim ebuild and emerge-$board gobi3k-sdk.

Signed-off-by: Elly Jones <ellyjones@google.com>
Signed-off-by: Jason Glasgow <jglasgow@google.com>
Review URL: https://chromereviews.googleplex.com/2631016
Change-Id: Ief8f0438b4ab972973f1d1d4d28d81ab8763add5

2 years agoInitial Commit: Code from Code Aurora 99/13099/1
Jason Glasgow [Fri, 16 Dec 2011 21:12:36 +0000 (16:12 -0500)]
Initial Commit: Code from Code Aurora

Includes overrides of the PRESUMBIT hooks

BUG=chrome-os-partner:7154
TEST=none
Change-Id: I94e0414355c1a7b77ce8a2d6b8174171178c7650

2 years agogobi3k-sdk: add LICENSE and README.chromium
Jason Glasgow [Fri, 16 Dec 2011 20:00:29 +0000 (15:00 -0500)]
gobi3k-sdk: add LICENSE and README.chromium

add LICENSE and README.chromium

BUG=none
TEST=none