mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Florian Fainelli <f.fainelli@gmail.com>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>,
	Thomas Bogendoerfer <tsbogend@alpha.franken.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Jiri Slaby <jirislaby@kernel.org>
Cc: linux-mips@vger.kernel.org, linux-serial@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 1/3] serial: sb1250-duart: Fix console message clobbering at channel resets
Date: Tue, 3 Nov 2026 14:06:13 -0800	[thread overview]
Message-ID: <9a6429d6-ecd5-45df-bcb3-6bfa235008a9@gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.21.2608060337580.55540@angie.orcam.me.uk>

On 8/6/26 03:54, 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 neither
> udelay() works.  Therefore delay by hand, observing that roughly 170
> iterations over an Input Port Register read are sufficient for the
> transmitter to drain with the BCM1250 SoC clocked at 800MHz, so using
> 2048 iterations should give enough margin including in particular for
> the faster BCM1480 SoC clocked at 1GHz.
> 
> Fixes: b45d52797432 ("sb1250-duart.c: SB1250 DUART serial support")
> Signed-off-by: Maciej W. Rozycki <macro@orcam.me.uk>
> Cc: stable@vger.kernel.org # v2.6.23+

Tested-by: Florian Fainelli <f.fainelli@gmail.com>
-- 
Florian


  reply	other threads:[~2026-11-03 22:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-06 10:54 [PATCH v3 0/3] MIPS: SiByte: Fix serial device regressions Maciej W. Rozycki
2026-08-06 10:54 ` [PATCH v3 1/3] serial: sb1250-duart: Fix console message clobbering at channel resets Maciej W. Rozycki
2026-11-03 22:06   ` Florian Fainelli [this message]
2026-08-06 10:54 ` [PATCH v3 2/3] serial: sb1250-duart: Fix bootconsole handover lockup Maciej W. Rozycki
2026-08-10  3:14   ` Philippe Mathieu-Daudé
2026-11-03 22:06   ` Florian Fainelli
2026-08-06 10:54 ` [PATCH v3 3/3] serial: sb1250-duart: Convert to use a platform device Maciej W. Rozycki
2026-11-03 21:42   ` Florian Fainelli

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9a6429d6-ecd5-45df-bcb3-6bfa235008a9@gmail.com \
    --to=f.fainelli@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=jirislaby@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=macro@orcam.me.uk \
    --cc=tsbogend@alpha.franken.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®