Subject: Re: [patch net-next RFC 04/12] dsa: set devlink port attrs for dsa ports

From: Andrew Lunn <[email-masked]>
Date: Thu, 17 May 2018 22:28:55 +0200

> The platform data assumes there is a network device named "eth0" as the
> parent device, yes I know this is terrible, but unfortunately we don't
> have anything better at this point

That is something we need to solve. With DT, it is easy, we have a
phandle to a device, and the name does not matter. systemd can rename
eth0 to enp0s25 and we will still find it, because we don't look for
the name, we look for the OF node associated to the device.

For platform data driven devices, we don't have this luxury. I have an
intel board with a Marvell switch. I have Debian running on it, so
systemd renames the interface. Builtin vs modules then becomes an
issue. Does the switch driver probe before or after systemd renames
the interface?

For embedded systems like this, we probably need a way to find an
interface based on its bus location, not its name. Not as good, but
maybe sufficient, a function which gives us the first physical
interface the machine has.

	  Andrew