Re: [PATCH] net: usb: lan78xx: add weak dependency with micrel phy module

From: Andrew Lunn
Date: Fri Jul 26 2024 - 16:59:47 EST


On Fri, Jul 26, 2024 at 02:15:26PM +0200, Jose Ignacio Tornos Martinez wrote:
> Hello Andrew,
>
> > What this does appear to do is differentiate between 'pre' which will
> > load the kernel module before it is requested. Since there is no 'pre'
> > for this, it seems pointless whacking this mole.
> Precisely, we need to fix the lan78xx case with micrel phy (and other
> possible phy modules) too, due to the commented issue generating initramfs
> in order to include the phy module.

I still don't see how this solves any issues with generating the
initramfs.

There are more than 200 Ethernet drivers, and around 75 PHY
drivers. If this patch is merged, you have one MAC driver indicating
it needs one PHY driver. There is nothing much you can do with that
information. You need to wait until 99% of the MAC drivers indicate
which PHY drivers are needed. Then you can use this information leave
out any PHY which is not needed, and hope you only break a small
number of devices. But even if you wait 20 years i doubt you will get
99% of the MAC drivers indicating what PHY drivers you need. Because
nothing really uses this information today.

So as far as i see, this has nothing to do with building the
initramfs.

Andrew