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

Commit 32f2ce03 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Greg Kroah-Hartman
Browse files

serial: sh-sci: Stop acknowledging DMA transmit completions



As dmaengine_prep_slave_sg() is called with the DMA_CTRL_ACK flag set
for DMA transmit requests, there's no need to explicitly acknowledge DMA
transmit requests in the DMA transmit completion callback.

Hence remove the call to async_tx_ack(), and remove the now unused
dma_async_tx_descriptor pointer in the sci_port structure.

Signed-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 565dd11a
Loading
Loading
Loading
Loading
+0 −5
Original line number Original line Diff line number Diff line
@@ -104,7 +104,6 @@ struct sci_port {
	struct dma_chan			*chan_rx;
	struct dma_chan			*chan_rx;


#ifdef CONFIG_SERIAL_SH_SCI_DMA
#ifdef CONFIG_SERIAL_SH_SCI_DMA
	struct dma_async_tx_descriptor	*desc_tx;
	struct dma_async_tx_descriptor	*desc_rx[2];
	struct dma_async_tx_descriptor	*desc_rx[2];
	dma_cookie_t			cookie_tx;
	dma_cookie_t			cookie_tx;
	dma_cookie_t			cookie_rx[2];
	dma_cookie_t			cookie_rx[2];
@@ -1285,9 +1284,6 @@ static void sci_dma_tx_complete(void *arg)


	port->icount.tx += s->tx_dma_len;
	port->icount.tx += s->tx_dma_len;


	async_tx_ack(s->desc_tx);
	s->desc_tx = NULL;

	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
		uart_write_wakeup(port);
		uart_write_wakeup(port);


@@ -1528,7 +1524,6 @@ static void work_fn_tx(struct work_struct *work)
				   DMA_TO_DEVICE);
				   DMA_TO_DEVICE);


	spin_lock_irq(&port->lock);
	spin_lock_irq(&port->lock);
	s->desc_tx = desc;
	desc->callback = sci_dma_tx_complete;
	desc->callback = sci_dma_tx_complete;
	desc->callback_param = s;
	desc->callback_param = s;
	spin_unlock_irq(&port->lock);
	spin_unlock_irq(&port->lock);