]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
serial: mvebu-uart: fix tx lost characters
authorGabriel Matni <gabriel.matni@exfo.com>
Thu, 22 Mar 2018 19:15:12 +0000 (19:15 +0000)
committerStefan Bader <stefan.bader@canonical.com>
Tue, 14 Aug 2018 10:30:13 +0000 (12:30 +0200)
commit6f576f5fb5c931a85b3086557777e76cf42018fe
tree4947a6dcfcfbc46cec9791d0c986250d6a98a835
parentede74a303dd358684885fb0912ca82a2e8dfa66d
serial: mvebu-uart: fix tx lost characters

BugLink: http://bugs.launchpad.net/bugs/1783418
[ Upstream commit c685af1108d7c303f0b901413405d68eaeac4477 ]

Fixes missing characters on kernel console at low baud rates (i.e.9600).
The driver should poll TX_RDY or TX_FIFO_EMP instead of TX_EMP to ensure
that the transmitter holding register (THR) is ready to receive a new byte.

TX_EMP tells us when it is possible to send a break sequence via
SND_BRK_SEQ. While this also indicates that both the THR and the TSR are
empty, it does not guarantee that a new byte can be written just yet.

Fixes: 30530791a7a0 ("serial: mvebu-uart: initial support for Armada-3700 serial port")
Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
Acked-by: Gregory CLEMENT <gregory.clement@bootlin.com>
Signed-off-by: Gabriel Matni <gabriel.matni@exfo.com>
Signed-off-by: Sasha Levin <alexander.levin@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
drivers/tty/serial/mvebu-uart.c