[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e912504e-651b-4992-953e-1a239cbf2550@cherry.de>
Date: Mon, 2 Jun 2025 11:38:30 +0200
From: Quentin Schulz <quentin.schulz@...rry.de>
To: "Abhishek Chauhan (ABC)" <quic_abchauha@...cinc.com>,
Paolo Abeni <pabeni@...hat.com>, Quentin Schulz <foss+kernel@...il.net>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller"
<davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Maxime Coquelin
<mcoquelin.stm32@...il.com>, Alexandre Torgue <alexandre.torgue@...s.st.com>
Cc: Jakob Unterwurzacher <jakob.unterwurzacher@...rry.de>,
Heiko Stuebner <heiko@...ech.de>, netdev@...r.kernel.org,
linux-stm32@...md-mailman.stormreply.com,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH net] net: stmmac: platform: guarantee uniqueness of bus_id
Hi Abhishek,
On 5/30/25 12:16 AM, Abhishek Chauhan (ABC) wrote:
> [Some people who received this message don't often get email from quic_abchauha@...cinc.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> On 5/26/2025 1:26 PM, Paolo Abeni wrote:
>> On 5/21/25 5:21 PM, Quentin Schulz wrote:
>>> From: Quentin Schulz <quentin.schulz@...rry.de>
>>>
>>> bus_id is currently derived from the ethernetX alias. If one is missing
>>> for the device, 0 is used. If ethernet0 points to another stmmac device
>>> or if there are 2+ stmmac devices without an ethernet alias, then bus_id
>>> will be 0 for all of those.
>>>
>>> This is an issue because the bus_id is used to generate the mdio bus id
>>> (new_bus->id in drivers/net/ethernet/stmicro/stmmac/stmmac_mdio.c
>>> stmmac_mdio_register) and this needs to be unique.
>>>
>>> This allows to avoid needing to define ethernet aliases for devices with
>>> multiple stmmac controllers (such as the Rockchip RK3588) for multiple
>>> stmmac devices to probe properly.
>>>
>>> Obviously, the bus_id isn't guaranteed to be stable across reboots if no
>>> alias is set for the device but that is easily fixed by simply adding an
>>> alias if this is desired.
>>>
>>> Signed-off-by: Quentin Schulz <quentin.schulz@...rry.de>
>>
>> I think no need to CC stable here, but you need to provide a suitable
>> fixes tag, thanks!
>>
> Quentin to make your life easy.
> It fixes this patch
> https://lore.kernel.org/lkml/1372930541-19409-1-git-send-email-srinivas.kandagatla@st.com/
> dt:net:stmmac: Add support to dwmac version 3.610 and 3.710
> It goes back in time to 2013 when this bus_id was introduced through dts
>
Fortunately, we ended up finding the same "culprit" (see v2 of my patch
that got merged[1] :) )
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/commit/?id=eb7fd7aa35bfcc1e1fda4ecc42ccfcb526cdc780
Thanks!
Quentin
Powered by blists - more mailing lists