public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Fushuai Wang <fushuai.wang@linux.dev>
To: andy.shevchenko@gmail.com
Cc: fushuai.wang@linux.dev, gregkh@linuxfoundation.org,
	ilpo.jarvinen@linux.intel.com, jirislaby@kernel.org,
	kees@kernel.org, linux-kernel@vger.kernel.org,
	linux-serial@vger.kernel.org, osama.abdelkader@gmail.com,
	wangfushuai@baidu.com
Subject: Re: [PATCH] serial: 8250: Clear CON_PRINTBUFFER on port re-registration
Date: Fri, 17 Apr 2026 12:00:17 +0800	[thread overview]
Message-ID: <20260417040017.63474-1-fushuai.wang@linux.dev> (raw)
In-Reply-To: <CAHp75VfyArBYG6p17A__hASERs6-rAp9U_NV68u5OOCUU_qoxA@mail.gmail.com>

>> ...
>> When BIOS "Serial Device" option is set to BMC, both 00:04 and 00:05 are mapped to
>> the same physical I/O port 0x3f8. And then:
>>
>>   1.00:04 is probed first and registers the console for port 0x3f8
>>   2.00:05 is detected and also needs to use port 0x3f8
>
> This is simply wrong. Do we ever support such a FW configuration?
> Why on earth are there two devices for the same resource exposed to
> the OS? It smells like a bug in BIOS.

My BIOS has this configuration option, and I also found other vendors'
BIOS with the same option, e.g.:

	https://download.msi.com/archive/mnu_exe/server/S3066-S377-v1.1-BIOS-UG.pdf

	Serial Device [BMC]/[S3M] Sets the Serial Device used to output bios serial log

Also, the kernel's serial8250_register_8250_port() already 
handles the case where multiple devices map to the same physical 
port. When serial8250_find_match_or_unused() detects that 
a device with the same port already exists, the caller 
(serial8250_register_8250_port()) removes the existing 
port before registering the new one.

Since the kernel already supports this remove-re-add process, I
think it makes sense to fix the CON_PRINTBUFFER issue to handle
this scenario, rather than relying on BIOS to avoid such configurations.

-- 
Regards,
WANG

      reply	other threads:[~2026-04-17  4:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-16  9:29 [PATCH] serial: 8250: Clear CON_PRINTBUFFER on port re-registration Fushuai Wang
2026-04-16  9:40 ` Andy Shevchenko
2026-04-16 10:02   ` Fushuai Wang
2026-04-16 10:15     ` Andy Shevchenko
2026-04-16 11:32       ` Fushuai Wang
2026-04-16 18:30         ` Andy Shevchenko
2026-04-17  4:00           ` Fushuai Wang [this message]

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=20260417040017.63474-1-fushuai.wang@linux.dev \
    --to=fushuai.wang@linux.dev \
    --cc=andy.shevchenko@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=ilpo.jarvinen@linux.intel.com \
    --cc=jirislaby@kernel.org \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=osama.abdelkader@gmail.com \
    --cc=wangfushuai@baidu.com \
    /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