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

Commit 0525e57e authored by Karthikeyan Ramasubramanian's avatar Karthikeyan Ramasubramanian
Browse files

tty: serial: msm_geni_serial: Enable IRQ after device becomes active



When the device resumes, IRQ is enabled. When the device resumes manually
i.e. without intervention from runtime PM framework, sometimes ISR gets
triggered as soon as interrupt is enabled. The check in ISR to ensure that
the device is not in suspended state fails. This failure to handle
interrupt leads to interrupt storm.

If the device resumes manually, enable the IRQ after setting the device
to active state.

Change-Id: I61ffd1c39bbeeaa152c2638ce5307ce55a5ed7c5
Signed-off-by: default avatarKarthikeyan Ramasubramanian <kramasub@codeaurora.org>
parent 54d765eb
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -494,6 +494,7 @@ static int msm_geni_serial_power_on(struct uart_port *uport)
			} else {
				pm_runtime_get_noresume(uport->dev);
				pm_runtime_set_active(uport->dev);
				enable_irq(uport->irq);
			}
			pm_runtime_enable(uport->dev);
			if (lock)
@@ -2580,6 +2581,7 @@ static int msm_geni_serial_runtime_resume(struct device *dev)
						SE_UART_MANUAL_RFR);
	/* Ensure that the Rx is running before enabling interrupts */
	mb();
	if (pm_runtime_enabled(dev))
		enable_irq(port->uport.irq);
	IPC_LOG_MSG(port->ipc_log_pwr, "%s:\n", __func__);
exit_runtime_resume: