From mwester at dls.net Sun May 4 07:24:48 2008 From: mwester at dls.net (Mike (mwester)) Date: Sun May 4 07:26:16 2008 Subject: [Bug 1376] GSM does not respond to flow control Message-ID: <481D48A0.5060907@dls.net> 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. http://bugzilla.openmoko.org/cgi-bin/bugzilla/show_bug.cgi?id=1376 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@openmoko.org ReportedBy: mwester@dls.net CC: buglog@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 associated 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 missed. 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. You'll 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 wakeup. By changing the point at which the UART interrupts the host CPU from the default 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 UART FIFO reaches 14 characters deep (it has 16 slots). We can assume that the hardware does not signal this until after the 14th character is complete, and therefore 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 overrun 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 well.