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

From: Dragan Simic
Date: Sat Jul 27 2024 - 13:15:46 EST


Hello,

On 2024-07-26 22:59, Andrew Lunn wrote:
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.

Before going into explaining my viewpoint, could someone, please, clarify
which LAN78xx USB-to-Ethernet bridge does this apply to? I already had
a look at a few LAN78xx datasheets, and I'm not sure how the external PHY
becomes exposed over the USB interface, so it needs a driver.