Commit Graph

9 Commits

Author SHA1 Message Date
Eric Holmberg 1f6671fd54 tty: n_smux: Add wakeup test case
Reproducing and isolating wakeup issues caused by incorrect UART
configuration and hardware issues currently requires analysis of the
internal logs which is often time consuming.

Add wakeup test case to allow teams to easily reproduce wakeup issues or
verify wakeup functionality.

Change-Id: I614d6ee3eefc6563930c45564b76452e89f65dc8
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2013-09-04 16:41:32 -07:00
Eric Holmberg 2dafe08ee0 tty: n_smux: Add function to determine if remote side is active
For subsystem restart unit tests, we need to know when the remote system
is back up to avoid having to add fixed delays.

Add private function to allow checking to see if the remote side is
active.

Change-Id: Ide2f5e4aba01479c2dc1e8c3b4332da7da6ad0c5
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2013-09-04 15:13:43 -07:00
Eric Holmberg 1065741618 tty: n_smux: Adjust receive retry queue parameters
If the remote modem has queued many small packets in the UART FIFO and
the SMUX client cannot provide receive buffers fast enough, then the
auto flow control command may not get processed before the receive queue
has overflowed.  In measured cases, an average of 10 packets are
received after flow control is enabled.  In the failure cases, up to 19
packets are received which is more than the max queue size (32 packets)
minus the high watermark (16 packets) which causes an overflow.

Use a bigger retry queue and more aggressive watermark values to make
auto flow control more responsive and to allow more packets to get
queued before an overflow occurs.

CRs-Fixed: 394198
Change-Id: I53f564a5401ea60f351e2e6b29ec41eb4b806653
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2013-09-04 15:13:43 -07:00
Eric Holmberg 4c7e2cb2d3 n_smux: add debugfs node for printing channel states
Add debugfs node that prints detailed state information
for all smux channels.

Change-Id: I727f1c53797ee317856056b8e4d9a8686940ce0f
Signed-off-by: Brent Hronik <bhronik@codeaurora.org>
Signed-off-by: Angshuman Sarkar <angshuman@codeaurora.org>
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2013-09-04 15:13:40 -07:00
Eric Holmberg ff317cbe1f tty: n_smux: Add retry queue size flow control
If the receive retry queue size gets too large, then automatically
enable flow control to prevent having to drop buffers.

Change-Id: If27599015b362ce013e177ee350e026933390d72
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2013-09-04 14:59:29 -07:00
Eric Holmberg 423763342e tty: n_smux: Add Dedicated Power Control Queue
The current design uses the existing channel queues for sending power
commands along with a command filter in the TX worker that always sends
all command messages for queues as long as the TTY UART link is up.
This can allow open and close events to be sent between a request to
power down the link and before the ACK has been received that actually
powers down the link.

Update the implementation to add a dedicated control channel for
power-control commands and bytes.  All power commands and bytes are now
sent by the TX worker that properly prioritizes the power commands over
logical channel commands.

CRs-Fixed: 369044
Change-Id: I05c080885c79c3510d02cc360bdfe879d68a962c
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-09-04 14:49:40 -07:00
Eric Holmberg dfad5aa502 tty: n_smux: Add exponential backoff for RX buffer failures
If a client is unable to allocate a buffer for an incoming packet, the
current software retries once without a delay and then drops the packet.
This causes issues for some clients that use flip buffers for processing
RX data.

This change changes the get_rx_buffer callback failure handling to do an
exponential-backoff retry giving the client time to free up a buffer for
processing.

Change-Id: I3284824a7d5a1d8a03314eebdb4488aaf560440c
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-09-04 14:49:38 -07:00
Eric Holmberg ac1ce2d32b tty: n_smux: Remove unused power bit
Remove power control bit that is no longer used and is no longer part of
the SMUX protocol.

Change-Id: I727eb7d848d5298c146919f2299a86d17643253f
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-09-04 14:49:35 -07:00
Eric Holmberg ec2d3c40a0 tty: n_smux: Add SMUX TTY Line Discipline Driver
Add new Serial Multiplexer (SMUX) driver.

This driver multiplexes multiple logical channels over a single
physical HSUART channel using the TTY Line Discipline framework.
This driver will be used in Fusion 4 for control plane, data plane
and DIAG traffic between Application processor and QSC modem.

Change-Id: Ibecf6cea872f5baf11fb93ded6124243a37a2085
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: Angshuman Sarkar <angshuman@codeaurora.org>
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-09-04 14:49:32 -07:00