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 16:48:28 +0200

> >Yes, modprobe dsa-loop-bdinfo first, which will create the
> 
> That is compiled inside "fixed_phy", isn't it?

Nope.

It follows a pattern seen with I2C and SPI subsystem. A bus driver
provides a bus to Linux. But i2c and SPI, unlike PCI or USB, you
cannot enumerate the devices on the bus, you need to know what devices
are there. So the board file registers an info structure, listing what
devices are on the bus. When the bus pops into existence, the core
links the bus to the info structure about devices on the bus and then
probes the devices.

The same is happening here. The fixed_phy driver provides an MDIO bus.

The info structure in dsa-loop-bdinfo says there is an dsa-loop device
at address 31 on that bus.

Combine the two causes the dsa-loop device to actually probe.

   Andrew