Skip to contentSkip to conversation

serial: Add missing call to init UCC UART port timeout

PATCH Applied Chuck Meade 3 participants 3 messages Jun 18, 2010 – Nov 24, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 serial: Add missing call to init UCC UART port timeout

From: Chuck Meade <[email protected]>

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).

---
 drivers/serial/ucc_uart.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
drivers/serial/ucc_uart.c +3 -0
index 907b06f..a136030 100644
@@ -961,6 +961,9 @@ static void qe_uart_set_termios(struct uart_port *port,
 	/* Do we really need a spinlock here? */
 	spin_lock_irqsave(&port->lock, flags);
 
+	/* Update the per-port timeout. */
+	uart_update_timeout(port, termios->c_cflag, baud);
+
 	out_be16(&uccp->upsmr, upsmr);
 	if (soft_uart) {
 		out_be16(&uccup->supsmr, supsmr);
Signature · 1 line
1.5.6.3
Acked-by on v1 1/1
#1 lore raw
Quoted 7 lines · Chuck Meade

From: Chuck Meade <[email protected]>

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.

Quoted 6 lines

For example, cat a large file to a UCC UART port. =A0With the current driver, the port will stay open for 30 seconds after the last byte of data is output. =A0But with this patch, the port is closed as expected, just after the data has been output (tx fifos empty).

--=20
Timur Tabi
Linux kernel developer at Freescale

Applied
#2 lore raw
In reply to Chuck Meade
Quoted 12 lines · Chuck Meade

From: Chuck Meade <[email protected]>

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).

Quoted 4 lines

---
drivers/serial/ucc_uart.c | 3 +++

1 files changed, 3 insertions(+), 0 deletions(-)

applied to next

- k