[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <793649ff-990c-46f0-9132-bc6e95fcb94f@lunn.ch>
Date: Wed, 20 Mar 2024 19:57:04 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Josua Mayer <josua@...id-run.com>
Cc: Jiri Pirko <jiri@...nulli.us>, Florian Fainelli <f.fainelli@...il.com>,
Vladimir Oltean <olteanv@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] net: dsa: mv88e6xxx: add warning for truncated mdio bus
id
> With separators ('!') we have:
> cp0!config-space@...00000!mdio@...200!ethernet-switch@...dio
> cp0!config-space@...00000!mdio@...200!ethernet-switch@...dio-external
> Truncated to MII_BUS_ID_SIZE:
> cp0!config-space@...00000!mdio@...200!ethernet-switch@...di
> cp0!config-space@...00000!mdio@...200!ethernet-switch@...di
This has been made worse by the DT maintainers wanting
ethernet-switch@4, not switch@4. And i guess config-space was also
something shorter in the past.
I think your idea of cropping from the beginning, not the end, is in
general a good solution. However, is there any danger of
cp0!config-space@...00000!mdio@...200!ethernet-switch@...dio-external
and
cp1!config-space@...00000!mdio@...200!ethernet-switch@...dio-external
I assume the two instances of cp have the same peripherals, at the
same address?
Another option would be if the name needs to be truncated, use the
fallback as if there was no np:
bus->name = "mv88e6xxx SMI";
snprintf(bus->id, MII_BUS_ID_SIZE, "mv88e6xxx-%d", index++);
That at least gives you unique names.
Andrew
Powered by blists - more mailing lists