[PATCH] Qtopia - enable suspend/resume to forcibly flow-control the GSM

Mike (mwester) mwester at dls.net
Thu Jun 12 16:00:40 CEST 2008

Holger Freyther wrote:
> On Thursday 12 June 2008 06:47:02 Mike (mwester) wrote:
>> The following patch enables Qtopia to forcibly flow-control the GSM
>> as suspend, and release the flow-control upon resume.  This eliminates
>> some race conditions, and ensures that no GSM data will be lost during
>> suspend and resume operations.
>> git/devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01.cpp.
>> orig     2008-06-10 21:28:52.000000000 -0500 +++
>> git/devices/ficgta01/src/plugins/phonevendors/ficgta01/vendor_ficgta01.cpp 
>> 2008-06-11 18:38:16.000000000 -0500 @@ -661,6 +661,15 @@
>>  void Ficgta01ModemService::sendSuspendDone()
>>  {
>> +// set forced flow control
>> +    usleep(100000);
> race? sleeping a random time? why do you need to sleep here?

Oops, yeah, that usleep is a left-over from some debugging; that line
should be removed.

The race conditions were described in gory detail in the patchset for
the kernel.  In a nutshell, there is a significant known interval where
an incoming message from the GSM will not wake the device, several
potential smaller intervals, and some other general areas that depend
upon undocumented hardware behavior.

By forcing flow-control immediately after Qtopia has put the device to
sleep, we ensure that all these holes and potential issues are avoided.

Mike (mwester)

More information about the distro-devel mailing list