From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from layka.disroot.org (layka.disroot.org [178.21.23.139]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 85425533D6; Fri, 31 Oct 2025 04:24:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=178.21.23.139 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761884667; cv=none; b=mMCk9ZxijiwLNlS+KmMHxSJjw0ID2YzXyWNnFS6pRdNLTtyqqfzbePrVXAETJl6fERMGX5keZ2oDu9VVkB9x/7MrhFY5y9trMI8N7bxNGKSiphNrkLTdJsO0pGbrSRlxLYgx8yAP6nHUTWB+gN8dGUfrnkW7lh7h1WEYVZohVw4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761884667; c=relaxed/simple; bh=phhFfHeIQ9LSPzEuJb9oDpH8YwXedf0P/DwxhUa9Y0M=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=AQP2eIZDBPKHdPr51gK0iTI57qlWf/qkkTMceYFf5CdJsKACiaCiyLj377WaJoQvt6Ixmt/9W7d0Ir6w5z9+mKQxgJKC1XgeBotAF7aY9Vp/a7uUniLmAAYyJm2hSrvQLolZ8s1tHNSYHAC6jWWFO6fXmQ3T9l8kiDzWG7j6riY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org; spf=pass smtp.mailfrom=disroot.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b=Qx12ZKKA; arc=none smtp.client-ip=178.21.23.139 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=disroot.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=disroot.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=disroot.org header.i=@disroot.org header.b="Qx12ZKKA" Received: from mail01.disroot.lan (localhost [127.0.0.1]) by disroot.org (Postfix) with ESMTP id 00DCA20EAC; Fri, 31 Oct 2025 05:24:23 +0100 (CET) X-Virus-Scanned: SPAM Filter at disroot.org Received: from layka.disroot.org ([127.0.0.1]) by localhost (disroot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id X_OKwGv9ww-b; Fri, 31 Oct 2025 05:24:22 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1761884662; bh=phhFfHeIQ9LSPzEuJb9oDpH8YwXedf0P/DwxhUa9Y0M=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Qx12ZKKAwdul2BlFr+hAGuL0eG4qr9h1Vu7KipSd4n0kSw8Pnd+8YMNgVHS5797OY RCiyDx/B7Hz67nZquEk/FlZTiGbiCQ1hvMEJLem8hoIdNBCCPuUGEC+8Hog05GOD6m uy5eKNGt3TzsggF/w9gufhK1yiGQh/hpo2/0GDy6qaWVz9Ew/ZcdutM/OTx51jRyB4 Qb9Ac6yAhq5OgJHfETXi/uNN8Wr2hT6tzPQqGjwa6FvjYJNwbZ0wk7VsYxO0TJd53w fDeebxUWOdjipfZjC7O6JbDBIRqRhcsJ5uKqwK6ibneAubfZsuhUAGa9w1TgLc9XlL 7fRiOi3VEqR/w== Date: Fri, 31 Oct 2025 04:24:05 +0000 From: Yao Zi To: "Russell King (Oracle)" , Maxime Chevallier Cc: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Yanteng Si , Huacai Chen , Philipp Stanner , Tiezhu Yang , Qunqin Zhao , Vladimir Oltean , Furong Xu <0x1207@gmail.com>, Kunihiko Hayashi , Jacob Keller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v2 2/3] net: stmmac: loongson: Use generic PCI suspend/resume routines Message-ID: References: <20251030041916.19905-1-ziyao@disroot.org> <20251030041916.19905-3-ziyao@disroot.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Thu, Oct 30, 2025 at 09:30:35AM +0000, Russell King (Oracle) wrote: > 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 > > > --- > > > 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. > > Yes, we need it to be this way around at least initially so that > STMMAC_LIBPCI gets merged into people's configs. > > I'd eventually suggest going the other way. > > We already have: > > config STMMAC_PLATFORM > tristate "STMMAC Platform bus support" > > if STMMAC_PLATFORM > > ... platform based drivers ... > > endif > > ... three PCI based drivers ... > > I'd suggest we do: > > config STMMAC_LIBPCI > tristate "STMMAC PCI bus support" > depends on PCI > ... > > if STMMAC_LIBPCI > > ... PCI based drivers ... > > endif Okay, will take this scheme instead. > There's no need to make everything depend on STMMAC_ETH, there's an > outer "if STMMAC_ETH" around all the platforms already. Okay. Yes, this dependency is redundant. Should we remove the unnecessary depends from other Kconfig options, too? STMMAC_SELFTESTS, STMMAC_PLATFORM, DWMAC_INTEL_PLAT, DWMAC_INTEL, DWMAC_LOONGSON and STMMAC_PCI are all enclosed by "if STMMAC_ETH" but carry this redundant dependency, too. Regards, Yao Zi > -- > RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ > FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!