mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-14 08:36:12 -04:00
serial: msm_geni_serial: Do not check for uport->suspended flag for suspend
During system suspend, uart_suspend_port() marking port->suspended flag to true before calling stop_rx and pm_ops for unvoting the clocks for console. After this when stop_rx called we are continuous getting cancel IRQ and ISR handler is returned with port->suspended check. This is leading to IRQ storm in console UART usecase. To avoid this replace uport->suspended check in handle isr with new flag added during resources_off so that we will handle stop_rx during system suspend for console case. Change-Id: I4666b727ff5c5b041280a05f3cdd44bb5f73bc16 Signed-off-by: Paras Sharma <parashar@codeaurora.org> Signed-off-by: Chandana Kishori Chiluveru <cchiluve@codeaurora.org>
This commit is contained in:
parent
3ecdedce1b
commit
e58b4f7097
1 changed files with 8 additions and 4 deletions
|
|
@ -207,6 +207,7 @@ struct msm_geni_serial_port {
|
|||
struct completion s_cmd_timeout;
|
||||
spinlock_t rx_lock;
|
||||
bool pm_auto_suspend_disable;
|
||||
bool is_clock_off;
|
||||
};
|
||||
|
||||
static const struct uart_ops msm_geni_serial_pops;
|
||||
|
|
@ -2041,7 +2042,7 @@ static void msm_geni_serial_handle_isr(struct uart_port *uport,
|
|||
bool s_cmd_done = false;
|
||||
bool m_cmd_done = false;
|
||||
|
||||
if (uart_console(uport) && uport->suspended) {
|
||||
if (uart_console(uport) && msm_port->is_clock_off) {
|
||||
IPC_LOG_MSG(msm_port->console_log,
|
||||
"%s. Console in suspend state\n", __func__);
|
||||
goto exit_geni_serial_isr;
|
||||
|
|
@ -2855,11 +2856,14 @@ static void msm_geni_serial_cons_pm(struct uart_port *uport,
|
|||
{
|
||||
struct msm_geni_serial_port *msm_port = GET_DEV_PORT(uport);
|
||||
|
||||
if (new_state == UART_PM_STATE_ON && old_state == UART_PM_STATE_OFF)
|
||||
if (new_state == UART_PM_STATE_ON && old_state == UART_PM_STATE_OFF) {
|
||||
se_geni_resources_on(&msm_port->serial_rsc);
|
||||
else if (new_state == UART_PM_STATE_OFF &&
|
||||
old_state == UART_PM_STATE_ON)
|
||||
msm_port->is_clock_off = false;
|
||||
} else if (new_state == UART_PM_STATE_OFF &&
|
||||
old_state == UART_PM_STATE_ON) {
|
||||
se_geni_resources_off(&msm_port->serial_rsc);
|
||||
msm_port->is_clock_off = true;
|
||||
}
|
||||
}
|
||||
|
||||
static void msm_geni_serial_hs_pm(struct uart_port *uport,
|
||||
|
|
|
|||
Loading…
Reference in a new issue