Re: [PATCH v3 2/2] serial: core: Don't clobber the baud rate on hangup via B0

From: Maciej W. Rozycki

Date: Wed Nov 04 2026 - 22:52:09 EST


On Tue, 3 Nov 2026, sashiko-bot@xxxxxxxxxx wrote:

> [Severity: Low]
> Does Documentation/driver-api/serial/driver.rst also need to be updated for
> this rename? It still lists uart_get_baud_rate under the kernel-doc
> identifiers for drivers/tty/serial/serial_core.c:

I missed that, will update in v4.

> [Severity: High]
> What happens in uart_get_baud_rate_save() when B0 is requested and
> port->hup_speed is outside the [min, max] range passed by the caller?

Failure return discussed along with 1/2. For B0 we'd preferably not poke
at the BRG setting programmed in hardware in the first place, but I find
that infeasible maintenance-wise for the huge set of UART drivers we have.

Any thoughts otherwise, anyone?

> [Severity: Medium]
> Can saving port->hup_speed inside uart_get_baud_rate_save() also break B0
> hangup in drivers/tty/serial/dz.c when an unsupported baud rate within
> [50, 9600] is requested?

That needs to be handled in the driver. I'll have a look, especially as
I own it anyway and have the hardware too.

Maciej