From patchwork Fri Jun 18 13:22:26 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chuck Meade X-Patchwork-Id: 56181 X-Patchwork-Delegate: galak@kernel.crashing.org Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id CFD89100C49 for ; Fri, 18 Jun 2010 23:32:54 +1000 (EST) X-Greylist: delayed 548 seconds by postgrey-1.32 at bilbo; Fri, 18 Jun 2010 23:32:48 EST Received: from mail.theptrgroup.com (mail.theptrgroup.com [71.178.251.9]) by ozlabs.org (Postfix) with ESMTP id 85DACB7D98 for ; Fri, 18 Jun 2010 23:32:48 +1000 (EST) Received: from [10.11.13.50] (unknown [10.11.13.50]) by mail.theptrgroup.com (Postfix) with ESMTP id 504FF1E003; Fri, 18 Jun 2010 09:23:37 -0400 (EDT) Message-ID: <4C1B7312.6080708@ThePTRGroup.com> Date: Fri, 18 Jun 2010 09:22:26 -0400 From: Chuck Meade User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.9) Gecko/20100423 Lightning/1.0b1 Thunderbird/3.0.4 MIME-Version: 1.0 To: linuxppc-dev@lists.ozlabs.org, "Chuck Meade (PTR Group)" Subject: [PATCH] serial: Add missing call to init UCC UART port timeout X-Enigmail-Version: 1.0.1 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org From: Chuck Meade 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 Acked-by: Timur Tabi --- 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);