mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-11 15:11:48 -04:00
serial: msm_geni_serial: Avoid manual RFR flow control for OBS
Currently UART driver making RFR to LOW during UART suspend. In issue case external SOC is used with Out of band sleep(OBS) and as RFR is low from UART SOC is trying to send RX data when UART is in sleep state and leading to RX packet loss. Fix this issue by avoiding manual RFR flow control feature for OBS case. Change-Id: Id9ee9cc48924bf8b70d580c7878cfdd164ed6b37 Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
This commit is contained in:
parent
1ca91eb817
commit
0d06d90a9c
1 changed files with 19 additions and 8 deletions
|
|
@ -3553,15 +3553,21 @@ static int msm_geni_serial_runtime_suspend(struct device *dev)
|
|||
SE_GENI_STATUS);
|
||||
|
||||
IPC_LOG_MSG(port->ipc_log_pwr, "%s: Start\n", __func__);
|
||||
/* Flow off from UART */
|
||||
msm_geni_serial_set_manual_flow(false, port);
|
||||
/* Flow off from UART only for In band sleep(IBS)
|
||||
* Avoid manual RFR FLOW ON for Out of band sleep(OBS).
|
||||
*/
|
||||
if (port->wakeup_byte && port->wakeup_irq)
|
||||
msm_geni_serial_set_manual_flow(false, port);
|
||||
ret = wait_for_transfers_inflight(&port->uport);
|
||||
if (ret) {
|
||||
IPC_LOG_MSG(port->ipc_log_pwr,
|
||||
"%s: wait_for_transfer_inflight return ret:%d\n",
|
||||
__func__, ret);
|
||||
/* Flow on from UART */
|
||||
msm_geni_serial_allow_rx(port);
|
||||
/* Flow on from UART only for In band sleep(IBS)
|
||||
* Avoid manual RFR FLOW ON for Out of band sleep(OBS)
|
||||
*/
|
||||
if (port->wakeup_byte && port->wakeup_irq)
|
||||
msm_geni_serial_allow_rx(port);
|
||||
return -EBUSY;
|
||||
}
|
||||
/*
|
||||
|
|
@ -3573,8 +3579,11 @@ static int msm_geni_serial_runtime_suspend(struct device *dev)
|
|||
if (ret) {
|
||||
IPC_LOG_MSG(port->ipc_log_pwr, "%s: stop rx failed %d\n",
|
||||
__func__, ret);
|
||||
/* Flow on from UART */
|
||||
msm_geni_serial_allow_rx(port);
|
||||
/* Flow on from UART only for In band sleep(IBS)
|
||||
* Avoid manual RFR FLOW ON for Out of band sleep(OBS)
|
||||
*/
|
||||
if (port->wakeup_byte && port->wakeup_irq)
|
||||
msm_geni_serial_allow_rx(port);
|
||||
return -EBUSY;
|
||||
}
|
||||
|
||||
|
|
@ -3585,11 +3594,13 @@ static int msm_geni_serial_runtime_suspend(struct device *dev)
|
|||
disable_irq(port->uport.irq);
|
||||
|
||||
/*
|
||||
* Flow on from UART
|
||||
* Flow on from UART only for In band sleep(IBS)
|
||||
* Avoid manual RFR FLOW ON for Out of band sleep(OBS).
|
||||
* Above before stop_rx disabled the flow so we need to enable it here
|
||||
* Make sure wake up interrupt is enabled before RFR is made low
|
||||
*/
|
||||
msm_geni_serial_allow_rx(port);
|
||||
if (port->wakeup_byte && port->wakeup_irq)
|
||||
msm_geni_serial_allow_rx(port);
|
||||
|
||||
ret = se_geni_resources_off(&port->serial_rsc);
|
||||
if (ret) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue