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

Commit 05d5848a authored by Naveen Kaje's avatar Naveen Kaje
Browse files

msm_serial_hs: update the DMA inflight indicator optimally



Update the TX DMA indicator flag when UART transmit begins
and ends.

Change-Id: I209e93d1ded414c88502f00316ce9d0477596507
Signed-off-by: default avatarNaveen Kaje <nkaje@codeaurora.org>
parent cdecac51
Loading
Loading
Loading
Loading
+1 −3
Original line number Diff line number Diff line
@@ -1388,12 +1388,11 @@ static void msm_hs_submit_tx_locked(struct uart_port *uport)
	int ret;

	if (uart_circ_empty(tx_buf) || uport->state->port.tty->stopped) {
		tx->dma_in_flight = false;
		msm_hs_stop_tx_locked(uport);
		return;
	}

	tx->dma_in_flight = true;

	tx_count = uart_circ_chars_pending(tx_buf);

	if (UARTDM_TX_BUF_SIZE < tx_count)
@@ -1872,7 +1871,6 @@ static void msm_serial_hs_tx_work(struct kthread_work *work)
	else
		MSM_HS_DBG("%s:circ buffer is empty\n", __func__);

	tx->dma_in_flight = false;
	wake_up(&msm_uport->tx.wait);

	uport->icount.tx += tx->tx_count;