-From cf6c923d27f0174403a4b4784fded74cafd98af6 Mon Sep 17 00:00:00 2001
+From 1a7d521d3b9191dfa4efeaa78c7f53ec2a70601b Mon Sep 17 00:00:00 2001
 From: Ferry Toth <ftoth@exalondelft.nl>
 Date: Sat, 17 Mar 2018 13:54:18 +0100
 Subject: [PATCH] serial: 8250_dma: use linear buffer for transmit

+	memcpy(dma->tx_buf, xmit->buf + xmit->tail, chunk1);
+	
+	chunk2 = CIRC_CNT(head, xmit->tail, UART_XMIT_SIZE) - chunk1;
+	if(chunk2 > 0) {
+		memcpy(dma->tx_buf + chunk1, xmit->buf, chunk2);
+	}
+	dma->tx_size = chunk1 + chunk2;

 
 	if (dma->tx_running)
 		return 0;
@@ -75,10 +79,18 @@ int serial8250_tx_dma(struct uart_8250_port *p)
 		return 0;
 	}
 
