summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/serial/8250/8250_dma.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/tty/serial/8250/8250_dma.c b/drivers/tty/serial/8250/8250_dma.c
index cf7a2e3288a6..7a26c4d13b18 100644
--- a/drivers/tty/serial/8250/8250_dma.c
+++ b/drivers/tty/serial/8250/8250_dma.c
@@ -201,6 +201,15 @@ int serial8250_request_dma(struct uart_8250_port *p)
goto release_rx;
}
+ /* 8250 tx dma requires dmaengine driver to support terminate */
+ ret = dma_get_slave_caps(dma->txchan, &caps);
+ if (ret)
+ goto err;
+ if (!caps.cmd_terminate) {
+ ret = -EINVAL;
+ goto err;
+ }
+
dmaengine_slave_config(dma->txchan, &dma->txconf);
/* RX buffer */
OpenPOWER on IntegriCloud