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 8B34D361DA2 for ; Fri, 27 Feb 2026 10:20:06 +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=1772187607; cv=none; b=A/7OI3ydSy5rzqEUF7itwvI5Dj5XBmVvdJonILhhFyErkzNoHumOragjmD1hGHZgHBf0zF+G3/MU0aPVscyH16xtJnNs7Mpgp9q1c9b96AoqgVre63wg/OJ7noa4dqBfIgf7j+hVBKxRyCCk2eVhypado0T0G01P/WhbU1WYJxc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772187607; c=relaxed/simple; bh=S5WbKUe/GSU6gr4sflzxccH6wjNJ3Au64Oqxsj6D0Rk=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=ENkXSHMF7n9MvepsiY9cWLCO2UaN5DdUYr4Rl1vqo8dYrO59WMosnFmiSnAq+z2c+DerKTzWy+ka9JerUg3pcrOosQxyarI9FLlLLJx0cLoBBTktiVCtVmlc5d96zN2IUr8/d8VyP8penMdVb/F3Z88HxssA7AgSzzkhpD3dt5I= 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=XRuEyIeA; 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="XRuEyIeA" 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=gc2DPN8dhX2Y1LOPz3Pgjt4dmwCjQz6dghOPKT5Mkqc=; b=XRuEyIeAZwlUVZF1DdUW031rTe cvvhNEEzGhi671hJzVqyKXUiWPT34bBho+i3MQDoZkj5prIbekJXlJVsSB/98Y5aQPZdg7keIBOul e7o3J0LjKtdlHaD9V8VFiSj5BPjSWkghqn8Z4JWb5irZRwTcqv2Doa3uzHfCdaSg6gRhgsfAyX2un usKAWz1E3VYotNfggkhzfv43CGdbuex8AuSftqAVG7gZ6LYf1/0zxam8IXHP8OY0YqkK2rSoiasyF ZCXLH5bFdDeMwWeSzEhZbDXnpAjB6ZK6vIeiZoDzZIgryNrbBBx3c36Id8vwskgNe0wiSfUsYxw/m xbEPlcBw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:43828 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 1vvuY5-000000000fN-13zF; Fri, 27 Feb 2026 09:54:17 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1vvuY3-0000000Avnq-1Spv; Fri, 27 Feb 2026 09:54:15 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn Cc: Alexandre Torgue , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org, Paolo Abeni Subject: [PATCH net-next 14/14] net: stmmac: move DMA configuration validation to driver probe 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: Fri, 27 Feb 2026 09:54:15 +0000 Move the DMA configuration validation from stmmac_init_dma_engine() to the start of the driver probe function. The platform glue is expected to supply the DMA configuration, and a non-zero programmable burst length (bpl). Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index a9b26d12a057..5d1cc9aead00 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -3249,11 +3249,6 @@ static int stmmac_init_dma_engine(struct stmmac_priv *priv) u32 chan = 0; int ret = 0; - if (!priv->plat->dma_cfg || !priv->plat->dma_cfg->pbl) { - netdev_err(priv->dev, "Invalid DMA configuration\n"); - return -EINVAL; - } - ret = stmmac_prereset_configure(priv); if (ret) return ret; @@ -7733,6 +7728,11 @@ static int __stmmac_dvr_probe(struct device *device, u32 rxq; int i, ret = 0; + if (!plat_dat->dma_cfg || !plat_dat->dma_cfg->pbl) { + dev_err(device, "invalid DMA configuration\n"); + return -EINVAL; + } + ndev = devm_alloc_etherdev_mqs(device, sizeof(struct stmmac_priv), MTL_MAX_TX_QUEUES, MTL_MAX_RX_QUEUES); if (!ndev) -- 2.47.3