Skip to content

Commit

Permalink
serial: 8250_port: when using DMA do not split writes in TTY
Browse files Browse the repository at this point in the history
By default tty_io write() splits large writes into 2K chunks. This
results to a single DMA transfer to split into 2 seperate transfers
which are not combined on the scatter gather list. As a result, under
heavy load or PM conditions an interchar gap occurs which can lead
to errors in the receiver.

Signed-off-by: Ferry Toth <ftoth@exalondelft.nl>
  • Loading branch information
htot authored and andy-shev committed Sep 19, 2022
1 parent 614c877 commit 2e88419
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions drivers/tty/serial/8250/8250_port.c
Original file line number Diff line number Diff line change
Expand Up @@ -2418,6 +2418,13 @@ int serial8250_do_startup(struct uart_port *port)
if (msg) {
dev_warn_ratelimited(port->dev, "%s\n", msg);
up->dma = NULL;
} else {
/*
* change tty_io write() to not split
* large writes into 2K chunks
*/
set_bit(TTY_NO_WRITE_SPLIT,
&port->state->port.tty->flags);
}
}

Expand Down

0 comments on commit 2e88419

Please sign in to comment.