Skip to content

Commit 8e18862

Browse files
Chuck Meadekumargala
authored andcommitted
drivers/serial/ucc_uart.c: Add missing call to init UCC UART port timeout
The UCC UART driver is missing a call to uart_update_timeout(). Without this call, attempting to close the port after outputting large amounts of data (i.e. using tty and uart buffering) results in long timeouts before the port will actually be shut down. For example, cat a large file to a UCC UART port. With the current driver, the port will stay open for 30 seconds after the last byte of data is output. But with this patch, the port is closed as expected, just after the data has been output (tx fifos empty). Signed-off-by: Chuck Meade <chuck@ThePTRGroup.com> Acked-by: Timur Tabi <timur@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
1 parent 895d603 commit 8e18862

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎drivers/tty/serial/ucc_uart.c‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -963,6 +963,9 @@ static void qe_uart_set_termios(struct uart_port *port,
963963
/* Do we really need a spinlock here? */
964964
spin_lock_irqsave(&port->lock, flags);
965965

966+
/* Update the per-port timeout. */
967+
uart_update_timeout(port, termios->c_cflag, baud);
968+
966969
out_be16(&uccp->upsmr, upsmr);
967970
if (soft_uart) {
968971
out_be16(&uccup->supsmr, supsmr);

0 commit comments

Comments
 (0)