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

Commit d9211a3e authored by Maria Yu's avatar Maria Yu Committed by Tengfei Fan
Browse files

tty: serial: msm: Avoid to start tx when port suspended



No need to start uart tx when the port is suspended.
Also there is a race condition during system suspend process
and flush_to_ldisc work. When uart port suspended, it
will disable clocks and if the flush_to_ldisc work try to
do a uart start tx it will cause a noc error.

Change-Id: Ia1327837de03fc1bf827b891f8a0fc4b1bfdcfec
Signed-off-by: default avatarMaria Yu <aiquny@codeaurora.org>
Signed-off-by: default avatarTengfei Fan <tengfeif@codeaurora.org>
parent 2fbf73da
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -428,6 +428,12 @@ static void msm_start_tx(struct uart_port *port)
	struct msm_port *msm_port = UART_TO_MSM(port);
	struct msm_dma *dma = &msm_port->tx_dma;

	/* No need to start tx when system suspended. */
	if (port->suspended) {
		printk_deferred("port suspended!\n");
		return;
	}

	/* Already started in DMA mode */
	if (dma->count)
		return;