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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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





[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux