Commit graph

9 commits

Author SHA1 Message Date
Duy Truong
04e554807c Update copyright to The Linux Foundation
Change-Id: Ibead64ce2e901dede2ddd1b86088b88f2350ce92
Signed-off-by: Duy Truong <dtruong@codeaurora.org>
2013-03-15 17:07:39 -07:00
Eric Holmberg
9359ddb5a2 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-03-07 15:25:20 -08:00
Eric Holmberg
67b9896653 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-03-07 15:25:18 -08:00
Eric Holmberg
acf856c7fb 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
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit 0ab6fc1757ae275a7e29c95588c8470fb787ee2a)

Change-Id: I20817f4dab3360f3c62bd83e74594555571a3a9f
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:13 -08:00
Eric Holmberg
0b5be95d8c 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-02-27 18:14:30 -08:00
Eric Holmberg
89e04ba097 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-02-25 11:32:43 -08:00
Eric Holmberg
760045e36d 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-02-25 11:32:41 -08:00
Eric Holmberg
d38c35a6ca 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-02-25 11:32:39 -08:00
Eric Holmberg
d68384d72e 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-02-25 11:32:35 -08:00