Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e58b4f70 authored by Paras Sharma's avatar Paras Sharma Committed by Chandana Kishori Chiluveru
Browse files

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: default avatarParas Sharma <parashar@codeaurora.org>
Signed-off-by: default avatarChandana Kishori Chiluveru <cchiluve@codeaurora.org>
parent 3ecdedce
Loading
Loading
Loading
Loading
+8 −4
Original line number Diff line number Diff line
@@ -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,