From nobody Sat Feb 7 17:42:22 2026 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.223.130]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B767C2DC765 for ; Fri, 6 Feb 2026 16:50:40 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=195.135.223.130 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770396641; cv=none; b=O21HixOQAimY6LeP+u7Xgzc6ssVDGCqzfK4I4lrO/aYNfulnUXVpg2Hk/xHmu06jXmJO/80t7bZ1T0U+c0f73ix1gznMgflRUO0WIU2e0oFTFBfF7Ek7bhAbEZsJnrDZw6RfgRf7zVP0SUAwHcL7T4XgZwUhuYWQlIqU7ZNP1Bs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770396641; c=relaxed/simple; bh=FLIAj97IJtWec5FxAAqgkF94UP7fJT2sYRy9Rv0J8TM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fGwfgQKHhU6Jc+YGwF2KHFN2qBO/ZfhXxooU2XqDY4OpjfN36JvWHZ+ER0NHqU5D7h1mxdcE+4MnwgVYiY7hfVXhKKhD2NuNS0WwtvPkfSEUl89vaXvprpJ6xPcUEPpu1LKcwry9F9anrO6cHublhJ5KypylF2NDua+J8PWdZZo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com; spf=pass smtp.mailfrom=suse.com; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=o57yazte; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b=o57yazte; arc=none smtp.client-ip=195.135.223.130 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=suse.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=suse.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="o57yazte"; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="o57yazte" Received: from pathway.suse.cz (unknown [IPv6:2a07:de40:b2bf:1b::12bd]) by smtp-out1.suse.de (Postfix) with ESMTP id 1AF203E6D4; Fri, 6 Feb 2026 16:50:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1770396639; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FdgcmSxPAwUXwZhrQwTcWv3u5B8erPdoTHSxithi8Ug=; b=o57yazteeqQjv4/zryPsdPgpvrL2rEDgdCKgFR+1PKrHLy/b+qMJU3Aqc5L0ZogqXaQQr7 f/9qBKmyRvCOKhqg8bPkcUKORXQOcpjvJwpUorjiUX2gVtcW3cU5cHe8oDdbirQwZxSySZ SF7+IEjhtkYYOWsc6ylYatzqyY9AqYE= Authentication-Results: smtp-out1.suse.de; dkim=pass header.d=suse.com header.s=susede1 header.b=o57yazte DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1770396639; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FdgcmSxPAwUXwZhrQwTcWv3u5B8erPdoTHSxithi8Ug=; b=o57yazteeqQjv4/zryPsdPgpvrL2rEDgdCKgFR+1PKrHLy/b+qMJU3Aqc5L0ZogqXaQQr7 f/9qBKmyRvCOKhqg8bPkcUKORXQOcpjvJwpUorjiUX2gVtcW3cU5cHe8oDdbirQwZxSySZ SF7+IEjhtkYYOWsc6ylYatzqyY9AqYE= From: Petr Mladek To: John Ogness Cc: Sergey Senozhatsky , Steven Rostedt , Marcos Paulo de Souza , Chris Down , linux-kernel@vger.kernel.org, Petr Mladek Subject: [PATCH 6/8] printk: Do not set Braille console as preferred_console Date: Fri, 6 Feb 2026 17:50:00 +0100 Message-ID: <20260206165002.496724-7-pmladek@suse.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260206165002.496724-1-pmladek@suse.com> References: <20260206165002.496724-1-pmladek@suse.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Spam-Score: 16.67 X-Spamd-Result: default: False [16.67 / 50.00]; SPAM_FLAG(5.00)[]; NEURAL_SPAM_LONG(3.50)[1.000]; BAYES_HAM(-3.00)[99.99%]; NEURAL_SPAM_SHORT(2.98)[0.994]; HFILTER_HOSTNAME_UNKNOWN(2.50)[]; RDNS_NONE(2.00)[]; ONCE_RECEIVED(1.20)[]; HFILTER_HELO_IP_A(1.00)[pathway.suse.cz]; MID_CONTAINS_FROM(1.00)[]; R_MISSING_CHARSET(0.50)[]; HFILTER_HELO_NORES_A_OR_MX(0.30)[pathway.suse.cz]; R_DKIM_ALLOW(-0.20)[suse.com:s=susede1]; MIME_GOOD(-0.10)[text/plain]; MX_GOOD(-0.01)[]; SPAMHAUS_XBL(0.00)[2a07:de40:b2bf:1b::12bd:from]; FUZZY_RATELIMITED(0.00)[rspamd.com]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[2a07:de40:b2bf:1b::12bd:from]; RCVD_COUNT_ZERO(0.00)[0]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.com:dkim,suse.com:mid,suse.com:email,pathway.suse.cz:helo]; DIRECT_TO_MX(0.00)[git-send-email 2.52.0]; DKIM_SIGNED(0.00)[suse.com:s=susede1]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; R_RATELIMIT(0.00)[to_ip_from(RLgy8oz5x7j7it6a73zx4uugbi)]; DKIM_TRACE(0.00)[suse.com:+]; RCPT_COUNT_SEVEN(0.00)[7] X-Rspamd-Action: add header X-Rspamd-Queue-Id: 1AF203E6D4 X-Rspamd-Server: rspamd1.dmz-prg2.suse.org X-Spam-Level: **************** X-Spamd-Bar: ++++++++++++++++ X-Spam-Flag: YES X-Spam: Yes Content-Type: text/plain; charset="utf-8" The Braille console reuses the framework for handling consoles preferred via the command line. However, it is a special-purpose interface that neither receives standard printk messages nor associates with /dev/console. Currently, the "preferred_dev_console" variable can point to a Braille console entry in the "preferred_consoles[]" array. This occurs if an entry was first created for a non-Braille console, but a later 'console=3D' parameter redefined it as a Braille console. Since a Braille console will only ever be enabled as such, it should not be tracked as the primary system console. Adjust the logic to ensure "preferred_dev_console" continues to point to the previously designated normal console instead. Signed-off-by: Petr Mladek --- kernel/printk/printk.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c index 279b36ef90bd..eb224eaace64 100644 --- a/kernel/printk/printk.c +++ b/kernel/printk/printk.c @@ -365,6 +365,7 @@ static int console_locked; static struct preferred_console preferred_consoles[MAX_PREFERRED_CONSOLES]; =20 static int preferred_dev_console =3D -1; +static int preferred_dev_console_prev =3D -1; static bool want_braille_console; int console_set_on_cmdline; EXPORT_SYMBOL(console_set_on_cmdline); @@ -2555,10 +2556,23 @@ static int update_preferred_console(int i, const ch= ar *name, const short idx, =20 braille_update_options(pc, brl_options); =20 - if (brl_options) + if (brl_options) { want_braille_console =3D true; - else + /* + * This console name will always get enabled as Braille + * console. It takes special code paths in register_console(). + * Do not treat it as a normal preferred_console. + */ + if (preferred_dev_console =3D=3D i) + preferred_dev_console =3D preferred_dev_console_prev; + } else { + /* + * Only the VisioBraille device is supported at the moment. + * One level history should be enough. + */ + preferred_dev_console_prev =3D preferred_dev_console; preferred_dev_console =3D i; + } =20 /* * @c console was defined by the user on the command line. --=20 2.52.0