Re: [PATCH] serial: 8250: don't register ports that have no hardware
Lucas Tanure <[email protected]>
| Newsgroups | org.kernel.vger.linux-serial,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
On 19/08/2026 07:49, Greg Kroah-Hartman wrote:
> On Wed, Aug 19, 2026 at 07:40:17AM +0100, Lucas Tanure wrote:
>> On 19/08/2026 06:57, Greg Kroah-Hartman wrote:
>>> On Tue, Aug 18, 2026 at 07:52:00PM +0100, Lucas Tanure wrote:
>>>> The 8250 driver creates a fixed set of port slots at boot and
>>>> registers a ttyS device for each one, even when the slot describes no
>>>> hardware. On device tree platforms those slots are empty, but they
>>>> still take the ttyS0..ttyS3 names.
>>>>
>>>> New Amlogic SoCs (S4, T7) name their real UARTs ttyS as well. With
>>>> both drivers built in, as in arm64 defconfig, the real port fails to bind:
>>>
>>> Then fix that bug, don't break everyone else's systems because of it.
>>>
>> Hi,
>>
>> Understood. I thought preventing 8250 from probing on devices that don't use
>> it would be a good idea, and fix my bug. Thanks for the feedback.
>>
>> I will tak to Amlogic list the ttyS name collision introduced for the new
>> Amlogic SoCs in e71aab9d6132.
>
> That was an explicit decision by Amlogic to do that, so there should not
> be any collisions as their systems should NOT be having the older 8250
> device tree entries.
>
> So perhaps just fix your device tree to not be broken?
>
> thanks,
>
> greg k-h
Hi,
There are no 8250 nodes in the Vim4 device tree.
At __serial8250_isa_init_ports() in 8250_platform.c it creates nr_uarts
ports unconditionally:
for (i = 0; i < nr_uarts; i++)
serial8250_setup_port(i);
And serial8250_init calls serial8250_isa_init_ports unconditionally. So
by just probing the module the serial ports are created.
Am I missing something? I can also boot with 8250.nr_uarts=0 to make the
issue go away, but I would prefer a code fix for the colision.
I will take the naming question to the Amlogic list, but I wanted to
double check my understand of the code.
Thanks,
Lucas