Skip to content
Commit 7bfb915a authored by Jonas Gorski's avatar Jonas Gorski Committed by Greg Kroah-Hartman
Browse files

serial: core: only stop transmit when HW fifo is empty

If the circular buffer is empty, it just means we fit all characters to
send into the HW fifo, but not that the hardware finished transmitting
them.

So if we immediately call stop_tx() after that, this may abort any
pending characters in the HW fifo, and cause dropped characters on the
console.

Fix this by only stopping tx when the tx HW fifo is actually empty.

Fixes: 8275b48b

 ("tty: serial: introduce transmit helpers")
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJonas Gorski <jonas.gorski@gmail.com>
Link: https://lore.kernel.org/r/20240303150807.68117-1-jonas.gorski@gmail.com
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent d47dd323
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment