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
9e04856ff4 tty: smux_ctl: Do not set POLLERR if signal received.
During the userspace freeze process, a fake signal is sent to userspace
applications.  In the case of SMUX CTL, the smux_ctl_poll() will set the
POLLERR flag if a signal is received.  This incorrectly unblocks the
userspace application that called poll() and the userspace application
will grab a wakelock before doing additional processing which aborts the
freeze process.

Change smux_ctl_poll() to not set POLLERR if a signal is received.

CRs-Fixed: 402651
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
(cherry picked from commit 3cbcfa3d79564063fc4aa52173feeff101926cb9)

Change-Id: I6c2753b97bd8cf694b75d6fd3713adc99da8b266
Signed-off-by: Sudhir Sharma <sudsha@codeaurora.org>
2013-03-07 15:19:16 -08:00
Eric Holmberg
e59c971d91 tty: smux_ctl: Add support for poll method.
Userspace clients hold a wakelock while calling read.  If data isn't
available, read() blocks preventing the release of the wakelock and
preventing the system from going into low power mode.

Implement poll() method to enable clients to call poll() to block and
wait for data without a wakelock.  Once poll() returns, then a wakelock
can be acquired and read() called without blocking which allows
minimizing the time a wakelock is held.

CRs-fixed: 379519
Change-Id: Icea23783ee2d03e2beac81bdb1b735e4edfd1d22
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2013-02-27 18:19:22 -08:00
Angshuman Sarkar
354983b320 tty: smux_ctl: add device attribute for open timeout
Port open call for smux is blocking. There is a 5 seconds default
timeout for the open call. The total number of retries for opening
the port makes the total wait time to be 11 minutes. This timeout
becomes an issue if QSC does not come up in time. Adding a device
attribute lets the user space control/reduce the timeout value.

CRs-Fixed: 372629
Change-Id: Ib20bf05da740c99dbb7e94b4df96d256ecadad34
Signed-off-by: Angshuman Sarkar <angshuman@codeaurora.org>
2013-02-27 18:17:19 -08:00
Eric Holmberg
3705270157 tty: smux_ctl: Remove unused ports
Only SMUX_DATA_CTL_0 is currently used from userspace.

Change-Id: Iab9e4fa9b096d34a67fb6662418aec0be1381adb
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2013-02-27 18:14:23 -08:00
Eric Holmberg
2af8f98a37 tty: smux_ctl: Disable debug logging
Disable debug logging that was only necessary for bring-up.

Change-Id: I5a31a982efdd1bb1915571158cc164a3856b097d
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2013-02-27 18:14:23 -08:00
Eric Holmberg
0fc7177c99 tty: smux_ctl: Support removing line discipline gracefully
SMUX_CTL module currently does not handle removal of the driver
gracefully. If there are any pending blocked calls on wait_event,
and the line discipline is removed, this results in accessing
destroyed wake queues.

Add support for aborting wait in response to device removal.

Change-Id: I3213306f6ed401f3abe5770ce324d9329e4dbc3f
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
2013-02-27 18:14:22 -08:00
Eric Holmberg
c620def47d n_smux: smux_ctl: Disable local loopback
For development, the local loopback mode was used.  Now that
the full system is ready, disable loopback mode to enable
communication with the remote system.

Change-Id: I24bee29b3fa41690ccbaf8992ecb3cb166dc3ffc
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: David Brown <davidb@codeaurora.org>
2013-02-25 11:32:37 -08:00
Eric Holmberg
01d77d4834 n_smux: smux_ctl: Userspace character device interface for SMUX
QMUXD from user-space will use this interface to communicate
control plane QMI messages between APPs and QSC modem in Fusion 4.

Change-Id: I2f51f6927a6f92b106548d22c3965575d4468d5a
Signed-off-by: Eric Holmberg <eholmber@codeaurora.org>
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@codeaurora.org>
2013-02-25 11:32:36 -08:00