From patchwork Tue Aug 2 18:57:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Budig X-Patchwork-Id: 1029902 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p72IwRds002260 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 2 Aug 2011 18:58:49 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QoKAS-0000Qd-SO; Tue, 02 Aug 2011 18:58:17 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QoKAS-0000Xm-9Z; Tue, 02 Aug 2011 18:58:16 +0000 Received: from smtprelay01.ispgateway.de ([80.67.31.24]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QoKAH-0000VU-O5 for linux-arm-kernel@lists.infradead.org; Tue, 02 Aug 2011 18:58:06 +0000 Received: from [77.182.4.20] (helo=mezzanine) by smtprelay01.ispgateway.de with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.68) (envelope-from ) id 1QoKAE-0002Jx-DJ; Tue, 02 Aug 2011 20:58:02 +0200 Received: from simon by mezzanine with local (Exim 4.71) (envelope-from ) id 1QoKAD-000105-MF; Tue, 02 Aug 2011 20:58:01 +0200 From: Simon Budig To: linux-arm-kernel@lists.infradead.org Subject: [PATCH] Fix logic of tx_empty. Date: Tue, 2 Aug 2011 20:57:46 +0200 Message-Id: <1312311466-3814-2-git-send-email-simon.budig@kernelconcepts.de> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1312311466-3814-1-git-send-email-simon.budig@kernelconcepts.de> References: <1312311466-3814-1-git-send-email-simon.budig@kernelconcepts.de> X-Df-Sender: 451898 X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110802_145805_978923_827DD1EF X-CRM114-Status: GOOD ( 11.66 ) X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [80.67.31.24 listed in list.dnswl.org] Cc: Simon Budig , Simon Budig X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Tue, 02 Aug 2011 18:58:49 +0000 (UTC) From: Simon Budig test for TX-FIFO *not empty* instead of TX-FIFO full. Signed-off-by: Simon Budig --- drivers/tty/serial/amba-pl011.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/tty/serial/amba-pl011.c b/drivers/tty/serial/amba-pl011.c index 05eb292..a23b419 100644 --- a/drivers/tty/serial/amba-pl011.c +++ b/drivers/tty/serial/amba-pl011.c @@ -792,7 +792,7 @@ static unsigned int pl01x_tx_empty(struct uart_port *port) { struct uart_amba_port *uap = (struct uart_amba_port *)port; unsigned int status = readw(uap->port.membase + UART01x_FR); - return status & (UART01x_FR_BUSY|UART01x_FR_TXFF) ? 0 : TIOCSER_TEMT; + return (status & UART01x_FR_BUSY) || !(status & UART011_FR_TXFE) ? 0 : TIOCSER_TEMT; } static unsigned int pl01x_get_mctrl(struct uart_port *port)