Re: [PATCH net-next v2 2/3] net: stmmac: loongson: Use generic PCI suspend/resume routines

From: Yao Zi

Date: Thu Oct 30 2025 - 05:11:30 EST


On Thu, Oct 30, 2025 at 08:38:12AM +0100, Maxime Chevallier wrote:
> Hi,
>
> On 30/10/2025 05:19, Yao Zi wrote:
> > Convert glue driver for Loongson DWMAC controller to use the generic
> > platform suspend/resume routines for PCI controllers, instead of
> > implementing its own one.
> >
> > Signed-off-by: Yao Zi <ziyao@xxxxxxxxxxx>
> > ---
> > drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 +
> > .../ethernet/stmicro/stmmac/dwmac-loongson.c | 36 ++-----------------
> > 2 files changed, 4 insertions(+), 33 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig
> > index 598bc56edd8d..4b6911c62e6f 100644
> > --- a/drivers/net/ethernet/stmicro/stmmac/Kconfig
> > +++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig
> > @@ -373,6 +373,7 @@ config DWMAC_LOONGSON
> > default MACH_LOONGSON64
> > depends on (MACH_LOONGSON64 || COMPILE_TEST) && STMMAC_ETH && PCI
> > depends on COMMON_CLK
> > + depends on STMMAC_LIBPCI
>
> If we go with a dedicated module for this, "select STMMAC_LIBPCI" would
> make more sense here I think. The same applies for the next patch.

Thanks, it's a reasonable point. I worried about possible unmet
dependencies caused by a select, but STMMAC_LIBPCI only depends on PCI
and STMMAC_ETH, which are necessary for DWMAC_LOONGSON and STMMAC_PCI
to show up.

I will change it to "select STMMAC_LIBPCI" in v3.

> Maxime
>

Best regards,
Yao Zi