Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965632AbbDQNzD (ORCPT ); Fri, 17 Apr 2015 09:55:03 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:34097 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965126AbbDQNhF (ORCPT ); Fri, 17 Apr 2015 09:37:05 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Stefan Agner Subject: [PATCH 3.19 073/101] tty: serial: fsl_lpuart: specify transmit FIFO size Date: Fri, 17 Apr 2015 15:29:01 +0200 Message-Id: <20150417132517.542357708@linuxfoundation.org> X-Mailer: git-send-email 2.3.5 In-Reply-To: <20150417132514.379828774@linuxfoundation.org> References: <20150417132514.379828774@linuxfoundation.org> User-Agent: quilt/0.64 MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-15 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1484 Lines: 42 3.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Stefan Agner commit 4e8f245937091b2c9eebf3d4909c9ceda4f0a78e upstream. Specify transmit FIFO size which might be different depending on LPUART instance. This makes sure uart_wait_until_sent in serial core getting called, which in turn waits and checks if the FIFO is really empty on shutdown by using the tx_empty callback. Without the call of this callback, the last several characters might not yet be transmitted when closing the serial port. This can be reproduced by simply using echo and redirect the output to a ttyLP device. Signed-off-by: Stefan Agner Signed-off-by: Greg Kroah-Hartman --- drivers/tty/serial/fsl_lpuart.c | 2 ++ 1 file changed, 2 insertions(+) --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1095,6 +1095,8 @@ static int lpuart_startup(struct uart_po sport->txfifo_size = 0x1 << (((temp >> UARTPFIFO_TXSIZE_OFF) & UARTPFIFO_FIFOSIZE_MASK) + 1); + sport->port.fifosize = sport->txfifo_size; + sport->rxfifo_size = 0x1 << (((temp >> UARTPFIFO_RXSIZE_OFF) & UARTPFIFO_FIFOSIZE_MASK) + 1); -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/