tty: serial: atmel: Call dma_async_issue_pending()
authorTudor Ambarus <tudor.ambarus@microchip.com>
Thu, 25 Nov 2021 09:00:18 +0000 (11:00 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Nov 2021 15:26:37 +0000 (16:26 +0100)
The driver wrongly assummed that tx_submit() will start the transfer,
which is not the case, now that the at_xdmac driver is fixed. tx_submit
is supposed to push the current transaction descriptor to a pending queue,
waiting for issue_pending to be called. issue_pending must start the
transfer, not tx_submit.

Fixes: 34df42f59a60 ("serial: at91: add rx dma support")
Fixes: 08f738be88bb ("serial: at91: add tx dma support")
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Link: https://lore.kernel.org/r/20211125090028.786832-4-tudor.ambarus@microchip.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/atmel_serial.c

index 376f7a9c2868a30be149846522b51604d19a6ada..269b4500e9e78caf37eb0dfd45f30d4b6dc2d600 100644 (file)
@@ -1009,6 +1009,8 @@ static void atmel_tx_dma(struct uart_port *port)
                                atmel_port->cookie_tx);
                        return;
                }
+
+               dma_async_issue_pending(chan);
        }
 
        if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
@@ -1269,6 +1271,8 @@ static int atmel_prepare_rx_dma(struct uart_port *port)
                goto chan_err;
        }
 
+       dma_async_issue_pending(atmel_port->chan_rx);
+
        return 0;
 
 chan_err: