Linux Serial subsystem development
 help / color / mirror / Atom feed
* [PATCH v3 0/2] serial: core: Don't clobber the baud rate on hangup via B0
@ 2026-11-03 22:07 Maciej W. Rozycki
  2026-11-03 22:07 ` [PATCH v3 1/2] serial: core: Unify uart_get_baud_rate() success return paths Maciej W. Rozycki
  2026-11-03 22:07 ` [PATCH v3 2/2] serial: core: Don't clobber the baud rate on hangup via B0 Maciej W. Rozycki
  0 siblings, 2 replies; 10+ messages in thread
From: Maciej W. Rozycki @ 2026-11-03 22:07 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby
  Cc: Ilpo Järvinen, Uwe Kleine-König (The Capable Hub),
	Andy Shevchenko, Crescent Hsieh, Hugo Villeneuve, Johan Hovold,
	John Ogness, Karl Mehltretter, linux-kernel, linux-serial

[-- Attachment #1: Type: text/plain, Size: 2281 bytes --]

Greg,

 This is v3 of the change for device baud rate preservation where the B0 
rate has been requested for hangup that we discussed at LPC.

 Following the observations regarding v2 I have now excluded the 8250 
console restoration path from rewriting port->hup_speed; this path only 
takes the most recent baud rate previously set and reinstates it with 
hardware without changing the setting chosen.  See the individual patches 
for further details of the changes made.

 I have verified it with the system and driver originally affected, that 
is a Broadcom BCM91250A "SWARM" system and sb1250-duart driver, but now 
also an MTI Malta system and the 8250 driver, with both showing the same 
symptoms on real hardware (worth mentioning since Malta is commonly used 
emulated in QEMU); cf. SIBYTE_SWARM and MIPS_MALTA in arch/mips/Kconfig.  
I have retained the console output logs previously attached for the bad vs 
fixed case; output is virtually the same across both systems.

 All that needed to be done to reproduce it was to keep killing getty(8)s 
repeatedly until init(8) decided something was wrong and chose to put 
their inittab(5) entries into a snooze, leaving the line(s) at the wrong 
speed setting.  I have done further experimentation with actual kernel 
console output by issuing:

# echo h >/proc/sysrq-trigger

once the console port has been hung up and that obviously also produced 
corrupt output without the fix and correct output with the fix applied.

 I have no means to verify the serial8250_console_restore() path; the fix 
is expected to make no functional change there.

 Since the return path from uart_get_baud_rate() has become more complex 
now than just supplying the baud rate chosen to the caller I went back to 
the original idea of having this as a small patch series, where 1/2 merely 
merges the two successful return paths into one.

 NB this fixes the missing %B0 literal markup as a part of the doc update.  
I've concluded it's not worth splitting off into a separate patch.  Let me 
know if you think otherwise.

 Previous iterations:

- v2 at: <https://lore.kernel.org/r/alpine.DEB.2.21.2610120150230.55767@angie.orcam.me.uk/>.

- v1 at: <https://lore.kernel.org/r/alpine.DEB.2.21.2605242242330.1450@angie.orcam.me.uk/>.

  Maciej

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/plain; CHARSET=US-ASCII; NAME=swarm-bad.log, Size: 1526 bytes --]

^[[H^[[J\rswarm.orcam.me.uk login: \0þ\0þ\0\0\0\0\0\0þ\0\0ð\0\0ð\0þ\0\0ð\0\0ð\0þ\0þ\0\0ð\0\0ð\0þ\0\0\0À\0þ\0þ\0þ\0\0ð\0þ\0\0ð\0\0\0\0\0\0\0ø\0\0ð\0þ\0\0ð\0\0ð\0þ\0\0\0À\0\0ð\0þ\0\0\0\0\0\0\0ø\0\0ð\0\0ð\0\0\0À\0\0ð\0þ\0\0ð\0þ\0þ\0\0\0\0\0\0þ\0\0ð\0\0ð\0\0\0À\0\0ð\0\0\0\0\0\0\0ø\0\0ð\0\0ð\0\0ð\0þ\0þ\0þ\0\0ð\0þ\0þ\0\0ð\0þ\0\0\0\0\0\0þ\0þ\0þ\0\0\0\0\0\0þ\0þ\0þ\0þ\0\0ð\0þ\0þ\0þ\0\0ð\0þ\0þ\0\0ð\0þ\0þ\0þ\0\0ð\0þ\0\0\0\0\0\0\0ð\0\0ð\0\0\0À\0þ\0þ\0þ\0þ\0þ\0þ\0þ\0þ\0\0\0\0\0\0\0ð\0\0ð\0\0ð\0\0ð\0þ\0þ\0\0\0\0\0\0þ\0þ\0\0ð\0þ\0\0\0À\0þ\0þ\0\0ð\0þ\0\0ð\0\0\0\0\0\0\0ð\0\0ð\0\0\0À\0\0ð\0þ\0þ\0\0ð\0þ\0þ\0þ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\0\0ø\0\0ð\0\0ð\0\0ð\0þ\0þ\0þ\0þ\0þ\0\0ð\0þ\0þ\0\0\0À\0þ\0þ\0þ\0þ\0\0ð\0þ\0\0ð\0þ\0þ\0þ\0þ\0\0ð\0þ\0\0\0À\0þ\0þ\0þ\0þ\0\0\0\0\0\0\0ð\0þ\0\0\0\0\0^[[H^[[J\rswarm.orcam.me.uk login: 

[-- Attachment #3: Type: text/plain, Size: 229 bytes --]

^[[H^[[Jswarm.orcam.me.uk login: INIT: Id "S0" respawning too fast: disabled for 5 minutes
INIT: Id "S1" respawning too fast: disabled for 5 minutes
INIT: no more processes left in this runlevel
^[[H^[[Jswarm.orcam.me.uk login: 

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2026-11-04 11:53 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-03 22:07 [PATCH v3 0/2] serial: core: Don't clobber the baud rate on hangup via B0 Maciej W. Rozycki
2026-11-03 22:07 ` [PATCH v3 1/2] serial: core: Unify uart_get_baud_rate() success return paths Maciej W. Rozycki
2026-11-03 22:23   ` sashiko-bot
2026-11-04 11:11   ` Andy Shevchenko
2026-11-03 22:07 ` [PATCH v3 2/2] serial: core: Don't clobber the baud rate on hangup via B0 Maciej W. Rozycki
2026-11-03 22:22   ` sashiko-bot
2026-11-04 11:10   ` Andy Shevchenko
2026-11-04 11:28     ` Johan Hovold
2026-11-04 11:50       ` Greg Kroah-Hartman
2026-11-04 11:52       ` Andy Shevchenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox