Re: [PATCH v2 1/6] serial: sb1250-duart: Fix console message clobbering at channel resets

From: Philippe Mathieu-Daudé

Date: Wed Jun 17 2026 - 07:57:47 EST


On 25/5/26 01:12, Maciej W. Rozycki wrote:
Ensure any characters outstanding have been sent before issuing channel
resets so as to prevent messages issued to the bootconsole from getting
clobbered.

Contrary to device documentation at the time the transmitter empty bit
is set only the transmit FIFO has been drained and there is still data
outstanding in the transmitter shift register, so wait an extra amount
of time for that register to drain too. This also prevents subsequent
messages produced to the console from getting clobbered, owing to what
seems a transmitter synchronisation issue.

When called from sbd_serial_console_init() it is too early for fsleep()
to work and even before lpj has been calculated and therefore the delay
is actually not sufficient for the transmitter to drain and is merely a
placeholder now. This will be addressed in a follow-up change.

Fixes: 84a9582fd203 ("serial: core: Start managing serial controllers to enable runtime PM")
Signed-off-by: Maciej W. Rozycki <macro@xxxxxxxxxxx>
Cc: stable@xxxxxxxxxxxxxxx # v6.5+
---
Changes from v1 (1/4),
<https://lore.kernel.org/r/alpine.DEB.2.21.2604130321540.29980@xxxxxxxxxxxxxxxxx/>:

- Sanitise the change heading.
---
drivers/tty/serial/sb1250-duart.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

Reviewed-by: Philippe Mathieu-Daudé <philmd@xxxxxxxxxxxxxxxx>