[Bug 1376] GSM does not respond to flow control

Mike (mwester) mwester at dls.net
Sun May 4 07:24:48 CEST 2008

FYI.  This problem doesn't seem to be getting anyone's attention, so 
maybe somebody on this list might need to know about this one.


            Summary: GSM does not respond to flow control
            Product: Neo1973 Hardware
            Version: GTA02v6
           Platform: Neo1973
         OS/Version: Linux
             Status: NEW
           Severity: critical
           Priority: P1
          Component: GSM Modem
         AssignedTo: sean_chiang at openmoko.org
         ReportedBy: mwester at dls.net
                 CC: buglog at lists.openmoko.org

The GSM does not respond to the hardware flow control signals in a timely
manner, resulting in occasional buffer overruns from the UART, and 
data loss.  This happens most often when the GTA0x is brought out of suspend
mode due to incoming call or SMS, with the result being that the call or 
SMS is

Specifics of the test setup, remediation attempts, and other information 
will be
happily shared with whomever is assigned to work on this bug.

Briefly, the easiest way to observe this is to have the GSM flow-controlled
during a suspend, then wake the device by sending it an SMS or a call. 
observe a buffer overrun approximately 1 out of 10 attempts by default,
depending on timing issues and the length of the message that caused the 

By changing the point at which the UART interrupts the host CPU from the 
1/2 full to 3/4 full, the problem becomes almost a certainty, with 
better than 2
out of 3 probability that a buffer overrun will occur.

The UART hardware will signal to flow-control the GSM when the GTA01 
reaches 14 characters deep (it has 16 slots).  We can assume that the 
does not signal this until after the 14th character is complete, and 
it is logical to assume that the GSM will transmit the 15th character 
before it
can respond to the flow-control -- this would allow one full character time
extra headroom.  However, looking at the dumps of the buffers when this 
occurs, it does not appear that the overrun is by some small, constant 
number of
characters (which might indicate a timing issue in the GSM or perhaps the
hardware between it and the host UART).  Instead all remaining 
characters in the
message being transmitted are lost, regardless of the length of the 
message.  In
other words, the behavior is consistent with a GSM that only checks for
flow-control _before sending an entire message_.

Regardless of the cause, the fact is that the GSM does not honor 
flow-control in
the way it should, which has been proven to cause data-loss on the 
GTA01, and
based on observed behavior is likely to cause data-loss on the GTA02 as 

More information about the gsmd-devel mailing list