diff options
author | Stefan Agner <stefan@agner.ch> | 2015-03-13 14:51:50 +0100 |
---|---|---|
committer | Sasha Levin <sasha.levin@oracle.com> | 2015-04-24 17:13:59 -0400 |
commit | eed8dd7be5887f2715f22461dd3847dbe66843cb (patch) | |
tree | bd88fab13bf6994e699a4fe0b5b376f7a7f02ce7 /drivers/tty | |
parent | 3372538a5a104689aef9c9352c886aa7ea6ef7f4 (diff) | |
download | lwn-eed8dd7be5887f2715f22461dd3847dbe66843cb.tar.gz lwn-eed8dd7be5887f2715f22461dd3847dbe66843cb.zip |
tty: serial: fsl_lpuart: specify transmit FIFO size
[ Upstream commit 4e8f245937091b2c9eebf3d4909c9ceda4f0a78e ]
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 <stefan@agner.ch>
Cc: stable <stable@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/fsl_lpuart.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index eb9bc7e1dbaa..8c202744f7b1 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1095,6 +1095,8 @@ static int lpuart_startup(struct uart_port *port) 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); |