[PATCH net-next 1/2] net: stmmac: Add PCS_LYNX as a dependency for the whole driver
Maxime Chevallier
maxime.chevallier at bootlin.com
Tue Jun 6 03:13:11 PDT 2023
Hello Geert, Russell,
On Tue, 6 Jun 2023 10:30:32 +0100
"Russell King (Oracle)" <linux at armlinux.org.uk> wrote:
> On Tue, Jun 06, 2023 at 10:29:20AM +0200, Geert Uytterhoeven wrote:
> > Hi Maxime,
> >
> > On Tue, 6 Jun 2023, Maxime Chevallier wrote:
> > > Although pcs_lynx is only used on dwmac_socfpga for now, the cleanup
> > > path is in the generic driver, and triggers build issues for other
> > > stmmac variants. Make sure we build pcs_lynx in all cases too, as for
> > > XPCS.
> >
> > That seems suboptimal to me, as it needlesly increases kernel size for
> > people who do not use dwmac_socfpga. Hence I made an alternative patch:
> > https://lore.kernel/org/7b36ac43778b41831debd5c30b5b37d268512195.1686039915.git.geert+renesas@glider.be
>
> A better solution would be to re-architect the removal code so that
> whatever creates the PCS is also responsible for removing it.
>
> Also, dwmac_socfpga nees to be reorganised anyway, because it calls
> stmmac_dvr_probe() which then goes on to call register_netdev(),
> publishing the network device, and then after stmmac_dvr_probe(),
> further device setup is done. As the basic driver probe flow should
> be setup and then publish, the existing code structure violates that.
>
I agree that this solution is definitely suboptimal, I wanted mostly to get it
fixed quickly as this breaks other stmmac variants.
Do we still go on with the current patch (as Geert's has issues) and then
consider reworking dwmac_socfpga ?
Maxime
More information about the linux-arm-kernel
mailing list