mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-08 12:58:12 -04:00
serial: msm_geni_serial: Bailout from suspend if RX data is pending
This change is to resolve potential race btw stop rx and cancel rx due to interrupt latency in the system. Change-Id: I7b510949f75bac5ec9f8f42f3d139131b259600f Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
This commit is contained in:
parent
235585bd23
commit
f46551cd83
1 changed files with 9 additions and 0 deletions
|
|
@ -1417,6 +1417,7 @@ static int stop_rx_sequencer(struct uart_port *uport)
|
|||
bool is_rx_active;
|
||||
unsigned int stale_delay;
|
||||
u32 dma_rx_status, s_irq_status;
|
||||
int usage_count;
|
||||
|
||||
IPC_LOG_MSG(port->ipc_log_misc, "%s\n", __func__);
|
||||
|
||||
|
|
@ -1458,6 +1459,14 @@ static int stop_rx_sequencer(struct uart_port *uport)
|
|||
IPC_LOG_MSG(port->ipc_log_misc, "%s: Interrupt delay\n",
|
||||
__func__);
|
||||
handle_rx_dma_xfer(s_irq_status, uport);
|
||||
if (!port->ioctl_count) {
|
||||
usage_count = atomic_read(&uport->dev->power.usage_count);
|
||||
IPC_LOG_MSG(port->ipc_log_misc,
|
||||
"%s: Abort Stop Rx, extend the PM timer, usage_count:%d\n",
|
||||
__func__, usage_count);
|
||||
pm_runtime_mark_last_busy(uport->dev);
|
||||
return -EBUSY;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue