Re: [PATCH net-next v1] net: stmmac: Default DWMAC_MOTORCOMM to m on MACH_LOONGSON64

From: Yao Zi

Date: Fri Sep 18 2026 - 03:14:57 EST


On Fri, Sep 18, 2026 at 02:48:45PM +0800, Tiezhu Yang wrote:
> On 2026/9/17 下午10:45, Andrew Lunn wrote:
> > > Before moving forward, I'd like to share an alternative thought.
> > > As noted in the earlier review, this network controller could be
> > > used across multiple architectures. To avoid the redundant churn
> > > in the defconfigs of every single architecture, I am wondering if
> > > we could unconditionally set it to default m in the Kconfig instead.
> >
> > ~/linux/drivers/net/ethernet/stmicro/stmmac$ grep default Kconfig
> > default n
> > default y
> > default STMMAC_PLATFORM
> > default ARC
> > default MACH_INGENIC
> > default ARCH_QCOM
> > default ARCH_LPC18XX
> > default ARCH_MESON
> > default ARCH_MA35
> > default ARCH_QCOM
> > default ARCH_RENESAS
> > default ARCH_ROCKCHIP
> > default ARCH_RZN1
> > default ARCH_S32
> > default ARCH_INTEL_SOCFPGA
> > default m if ARCH_SOPHGO
> > default m if ARCH_SPACEMIT
> > default m if ARCH_STARFIVE
> > default ARCH_STI
> > default ARCH_STM32
> > default ARCH_SUNXI
> > default ARCH_SUNXI
> > default ARCH_SUNXI
> > default ARCH_MXC
> > default MACH_LOONGSON32
> > default ARCH_VISCONTI
> > default X86
> > default MACH_LOONGSON64
> >
> > No other glue driver does this. Why is this one special?
>
> If it is not proper to change Kconfig,
> I am fine to modify the arch-specific defconfig instead.

I'm against both of the ideas. From the aspect of a distribution
maintainer, there are too many stuff missing from architecture
defconfigs, so only enabling one or two drivers by default doesn't even
improve the situation much, costs (kernel) maintainers' time.

>From the aspect of a kernel developer, a bloated defconfig/default only
further lengthen the compilation process, forcing ones that don't have a
good enough machine to spend more time on turning off one and another
options their platforms don't need.

> But by the way, I noticed that there are the following code:
>
> $ grep -rnw "default m" drivers/net/ethernet/
> drivers/net/ethernet/stmicro/stmmac/Kconfig:221: default m if ARCH_SOPHGO
> drivers/net/ethernet/stmicro/stmmac/Kconfig:233: default m if ARCH_SPACEMIT
> drivers/net/ethernet/stmicro/stmmac/Kconfig:245: default m if ARCH_STARFIVE
> drivers/net/ethernet/spacemit/Kconfig:21: default m if ARCH_SPACEMIT
> drivers/net/ethernet/marvell/octeontx2/Kconfig:54: default m
> drivers/net/ethernet/hisilicon/Kconfig:106: default m
> drivers/net/ethernet/hisilicon/Kconfig:134: default m
> drivers/net/ethernet/sun/Kconfig:77: default m
> drivers/net/ethernet/sun/Kconfig:81: default m
> drivers/net/ethernet/sun/Kconfig:89: default m
> drivers/net/ethernet/mellanox/mlxsw/Kconfig:37: default m
> drivers/net/ethernet/mellanox/mlxsw/Kconfig:47: default m
> drivers/net/ethernet/mellanox/mlxsw/Kconfig:67: default m
> drivers/net/ethernet/mellanox/mlxsw/Kconfig:86: default m
>
> Thanks,
> Tiezhu
>

Best regards,
Yao Zi