Re: [PATCH 6/8] printk: Do not set Braille console as preferred_console

From: John Ogness

Date: Thu Feb 19 2026 - 10:36:38 EST


On 2026-02-19, Petr Mladek <pmladek@xxxxxxxx> wrote:
> We actually also need to prevent setting "preferred_dev_console" when
> the same console has been preferred as Braille before, for example:
>
> console=brl,ttyS0,115200 console=ttyS0,115200
>
> One might argue that the later definition should win. But it would
> be a regression.
>
> The motivation to keep the current behavior is that the Braille console
> is special. IMHO, it should always win. Otherwise, the user might have
> hard times to debug the problem.

I have no experience about how a Braille console is used/configured in
the real world. But your reasoning is clear. Once a device has been
flagged as a Braille device, it can never be un-flagged.

> My new version of this code is:
>
> /*
> * The last preferred console should get associated with /dev/console.
> * Except for the Braille console which can't get associated with
> * /dev/console. One level history should be enough because only one,
> * the VisioBraille device, is supported at the moment.
> */
> if (brl_options) {
> want_braille_console = true;
> if (preferred_dev_console == i) {
> preferred_dev_console = preferred_dev_console_prev;
> preferred_dev_console_prev = -1;
> }
> } else if (!is_braille_console_preferred(pc)) {
> preferred_dev_console_prev = preferred_dev_console;
> preferred_dev_console = i;
> }

Yes, this looks good. Thanks.

John