From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [78.32.30.218]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2603B33F370 for ; Wed, 8 Apr 2026 09:27:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=78.32.30.218 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775640467; cv=none; b=TMtYn3M8kDMXP3P+zA93FFSXUSf9I+l3QYUQzh9bQAwMXh2pqc7YKE+i6eI8Qal14yELsNC/0CCeLo8qntx8f8j/QuUi8DqSUEC/+fwExRneF75nv9ANRvMl2iDKsBjBJSzedrKZ11irMhoVJdkWD16Yz4pt8WTwZfuW2qqsPs0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1775640467; c=relaxed/simple; bh=REqXr5wLMfj26wRNRYDG7YJyazjTHsxYB64myy/nHFI=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=UvGlji8oyLhFRMTsd91Kc+8YQQU7u1w15Y0K8PTfWyoY9AWCSYIEmsjekj+ZU1ePjbpqbXJsOj1EjhNr2knNOJgK1ebgNvicnMZin0FOAfQsN1kNahhVfOpfuEUFZETxZH0+mf1cu4HONttDeUUuwxOAWFfwa+Ueo3dmtDBO4oo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk; spf=none smtp.mailfrom=armlinux.org.uk; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b=eLYN5hjG; arc=none smtp.client-ip=78.32.30.218 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=armlinux.org.uk Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=armlinux.org.uk header.i=@armlinux.org.uk header.b="eLYN5hjG" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Date:Sender:Message-Id:Content-Type: Content-Transfer-Encoding:MIME-Version:Subject:Cc:To:From:References: In-Reply-To:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=Ed7IJ5GSBXEYvfVGQN3rSQE0J19697RZGgHvSAagUwg=; b=eLYN5hjGogoHiOmFImFRlYgYhI gWL4oUX5KiyAxcvm3HY91IWYJDRO1TmqUl+Uh0G8yFcB3J0BEHR1h3PcI+Eba6CTtPCathDQLDFPO OYb1y926ZCokPdP6mJADhAWFaiUdCRFd1gxEajOxE55NhumnfNf11g3T9Q+CT3D/toZgsyAj2FTZP c7LuDKVN/9NxKrLzD89y1UWwKSQNtlqR4VvwPxfcZrt1TyB9+O7qiDiHhm+XlRfouwDr+ElSYZsUB p4SJWGt61fQsmq0OlYVhyBc57rZqpH0dav7lXKSBPuuScBTwSU8MReAMCl1JOxoRxoXzn5Ep8h6AU WDdF0VVw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:43578 helo=rmk-PC.armlinux.org.uk) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1wAPBw-0000000023h-1TcH; Wed, 08 Apr 2026 10:27:20 +0100 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1wAPBl-0000000F7kT-3kSP; Wed, 08 Apr 2026 10:27:09 +0100 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn Cc: Alexandre Torgue , Andrew Lunn , Chen-Yu Tsai , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jitendra Vegiraju , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-sunxi@lists.linux.dev, netdev@vger.kernel.org, Paolo Abeni , Samuel Holland Subject: [PATCH RFC net-next 06/10] net: stmmac: dche is only for GMAC4 cores Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" Message-Id: Sender: Russell King Date: Wed, 08 Apr 2026 10:27:09 +0100 dma_cfg->dche is only read by dwmac4_dma_init(), which is only called for the DWMAC_CORE_GMAC4 core type. Rather than having a bare IP version check that can match any core type, make this conditional on DWMAC_CORE_GMAC4 to make it clear that it's a GMAC4 feature. Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 295d31d7b28b..e47321119c83 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -7895,9 +7895,10 @@ static int __stmmac_dvr_probe(struct device *device, if (ret) goto error_hw_init; - /* Only DWMAC core version 5.20 onwards supports HW descriptor prefetch. + /* Only DWMAC4 core version 5.20 onwards support HW descriptor prefetch. */ - if (priv->snpsver < DWMAC_CORE_5_20) + if (priv->plat->core_type != DWMAC_CORE_GMAC4 || + priv->snpsver < DWMAC_CORE_5_20) priv->plat->dma_cfg->dche = false; stmmac_check_ether_addr(priv); -- 2.47.3