[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2024072923-galleria-gumdrop-5c56@gregkh>
Date: Mon, 29 Jul 2024 08:13:41 +0200
From: Greg KH <gregkh@...uxfoundation.org>
To: Dragan Simic <dsimic@...jaro.org>
Cc: Andrew Lunn <andrew@...n.ch>,
Jose Ignacio Tornos Martinez <jtornosm@...hat.com>,
UNGLinuxDriver@...rochip.com, davem@...emloft.net,
edumazet@...gle.com, f.fainelli@...il.com, kuba@...nel.org,
linux-kbuild@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-usb@...r.kernel.org, lucas.demarchi@...el.com,
masahiroy@...nel.org, 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
On Mon, Jul 29, 2024 at 06:43:40AM +0200, Dragan Simic wrote:
> On 2024-07-28 22:57, Andrew Lunn wrote:
> > > In other words, this patch doesn't subtract anything. Instead, it
> > > just
> > > adds a weakdep link between the lan78xx and micrel modules, so the
> > > kernel
> > > itself can report that dependency, which may actually result in one
> > > more
> > > PHY driver added to a generated initial ramdisk.
> >
> > So at the moment, does the initramfs contain all PHY modules? I guess
> > it does, because you have no knowledge which are actually needed. And
> > this does not help you in any way, as you said, it does not subtract
> > anything.
>
> Basically, an initial ramdisk shouldn't contain any PHY modules that
> aren't automatically detected as needed on a particular system, for
> which the initial ramdisk is built. That's how selecting modules
> while building the initial ramdisks works. On the other hand, if it's
> some initial ramdisk built by a Linux distribution and intended to
> support multiple systems or boards, it may contain whatever the
> distribution sees fit.
>
> Having weakdeps defined actually does help here. For example, a Linux
> distribution mentioned above no longer needs to hand-craft the rules
> for initial ramdisk generation for the PHY modules that should be put
> into an initial ramdisk together with the lan78xx driver, if the Linux
> distribution chooses to include the lax78xx driver. Having weakdep(s)
> defined makes the kernel do that instead. Also, there's no point in
> including every single PHY driver module, because not all of them are
> needed for a particular selection of MAC drivers, which comes from the
> intended purpose of the initial ramdisk built by a Linux distribution,
> i.e. the target architecture, supported board category, etc.
>
> Let's also keep in mind that including all PHY modules into an initial
> ramdisk inevitably makes it larger, which often isn't an option for
> resource-constrained embedded systems.
>
resource-constrained embedded systems know their dependancies and their
hardware configurations, so I don't see how the weak-deps help at all
here.
You are arguing two different things it seems, neither of which this
change helps out at all with, so I will provide a:
Nacked-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
here until it gets straightened out.
thanks,
greg k-h
Powered by blists - more mailing lists