linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] serial: Add missing call to init UCC UART port timeout
@ 2010-06-18 13:22 Chuck Meade
  2010-06-21 17:55 ` Timur Tabi
  2011-11-24  8:25 ` Kumar Gala
  0 siblings, 2 replies; 3+ messages in thread
From: Chuck Meade @ 2010-06-18 13:22 UTC (permalink / raw)
  To: linuxppc-dev, Chuck Meade (PTR Group)

From: Chuck Meade <chuck@ThePTRGroup.com>

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>
---
 drivers/serial/ucc_uart.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/drivers/serial/ucc_uart.c b/drivers/serial/ucc_uart.c
index 907b06f..a136030 100644
--- a/drivers/serial/ucc_uart.c
+++ b/drivers/serial/ucc_uart.c
@@ -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);
-- 
1.5.6.3

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: Add missing call to init UCC UART port timeout
  2010-06-18 13:22 [PATCH] serial: Add missing call to init UCC UART port timeout Chuck Meade
@ 2010-06-21 17:55 ` Timur Tabi
  2011-11-24  8:25 ` Kumar Gala
  1 sibling, 0 replies; 3+ messages in thread
From: Timur Tabi @ 2010-06-21 17:55 UTC (permalink / raw)
  To: Chuck Meade; +Cc: linuxppc-dev

On Fri, Jun 18, 2010 at 8:22 AM, Chuck Meade <chuck@theptrgroup.com> wrote:
> From: Chuck Meade <chuck@ThePTRGroup.com>
>
> 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. =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).
>
> Signed-off-by: Chuck Meade <chuck@ThePTRGroup.com>

Acked-by: Timur Tabi <timur@freescale.com>

--=20
Timur Tabi
Linux kernel developer at Freescale

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] serial: Add missing call to init UCC UART port timeout
  2010-06-18 13:22 [PATCH] serial: Add missing call to init UCC UART port timeout Chuck Meade
  2010-06-21 17:55 ` Timur Tabi
@ 2011-11-24  8:25 ` Kumar Gala
  1 sibling, 0 replies; 3+ messages in thread
From: Kumar Gala @ 2011-11-24  8:25 UTC (permalink / raw)
  To: Chuck Meade; +Cc: linuxppc-dev


On Jun 18, 2010, at 8:22 AM, Chuck Meade wrote:

> From: Chuck Meade <chuck@ThePTRGroup.com>
> 
> 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>
> ---
> drivers/serial/ucc_uart.c |    3 +++
> 1 files changed, 3 insertions(+), 0 deletions(-)

applied to next

- k

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2011-11-24  8:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-18 13:22 [PATCH] serial: Add missing call to init UCC UART port timeout Chuck Meade
2010-06-21 17:55 ` Timur Tabi
2011-11-24  8:25 ` Kumar Gala

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).