[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240724161020.442958-1-jtornosm@redhat.com>
Date: Wed, 24 Jul 2024 18:10:19 +0200
From: Jose Ignacio Tornos Martinez <jtornosm@...hat.com>
To: jtornosm@...hat.com
Cc: UNGLinuxDriver@...rochip.com,
andrew@...n.ch,
davem@...emloft.net,
edumazet@...gle.com,
gregkh@...uxfoundation.org,
kuba@...nel.org,
linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org,
lucas.demarchi@...el.com,
mcgrof@...nel.org,
netdev@...r.kernel.org,
pabeni@...hat.com,
woojung.huh@...rochip.com
Subject: Re: [PATCH] net: usb: lan78xx: add weak dependency with micrel phy module
Hello Florian,
> What is the difference with the existing MODULE_SOFTDEP() which has pre
> and post qualifiers and seems just as fit?
MODULE_SOFTDEP (with pre and/or post qualifiers as you say) causes the
modules to be directly loaded.
MODULES_WEAKDEP doesn't cause the modules to be loaded.
The load will be done later, if necessary, by other mechanisms in the kernel.
For example for the commented case, the associated phy is read using mdio bus
and then the associated phy module is loaded during runtime by means of the
function phy_request_driver_module.
It is just informing to user applications, like dracut, about this in order to
be able to prepare the complete and correct initramfs.
Keep in mind that these applications have no way of knowing about this situation
and if the phy is not included in this case, the driver will not work at
initramfs stage.
If we used MODULE_SOFTDEP the modules would be loaded in advance even if they
were not necessary.
For the commented case, I have included only one phy because it is the hardware
that I have, but other phy devices (modules) are possible and they can be some.
Thanks
Best regards
José Ignacio
Powered by blists - more mailing lists