OSDN Git Service

serial: msm_serial_hs: Keep Rx and Tx path clean while going inactive
authorMukesh Kumar Savaliya <msavaliy@codeaurora.org>
Fri, 1 Sep 2017 12:20:08 +0000 (17:50 +0530)
committerMukesh Kumar Savaliya <msavaliy@codeaurora.org>
Wed, 20 Sep 2017 13:29:41 +0000 (18:59 +0530)
commitb60a2fa1ee97e1b571fc03c2f6697174e2303307
tree304accc73fc682aabe6c00213b5d78ac58e2442d
parent6f777b2385c98a17d69bbeead6edbc7ad7470f72
serial: msm_serial_hs: Keep Rx and Tx path clean while going inactive

This patch disables Rx and Tx engine properly while going to suspend or
shutdown. There are chances when BT SOC or client is going bad and
disrupts the UART SW state machine.

1.Do not allow double resource_vote and hence pipe connect at port open.
2.While going to suspend, close the HW resources forcibly to prevent
  UART from going bad for the subsequent resume cycle.
3.Stop Rx engine gracefully even if clocks are off to obey the framework.
4.During resource unvote, if runtime PM is disabled then go for forced
  suspend.
5.In case of fatal error, stop further IPC logging.
6.Add relevant log if the Rx pipe is not empty at the time disconnecting.
7.Prevent Rx byte entering in case of back to back loopback test, as
  this causes data mismatch.
8.Add the logs correctly just after reading the status instead doing it
  later which doesn't get logged in case of any failure.

Change-Id: I9426e9ae8c5b07d74e95ec37651ece0d46928104
Signed-off-by: Mukesh Kumar Savaliya <msavaliy@codeaurora.org>
drivers/tty/serial/msm_serial_hs.c