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 CC2B032ED2E; Sat, 14 Mar 2026 09:43:11 +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=1773481393; cv=none; b=iKpSpm5jTo1ppFr1x4f575Eoc2trqiBiOtSP+65+kENHUJbvu2nna8AkQO6npl1nV3mzcjo9aYfGf/yfbJk2ZG+H+vi9NEwc7dluyvBjspvr89aGtJctpK+GeqfiNyv+btAkeZMLbS36j+JFSSUzfm5gCJo9RRcNZqCw9Btk6M0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773481393; c=relaxed/simple; bh=pUe2/MltkAZUYdC6cY/tnaDoNeHAzCaV3lKkkqwnisU=; h=In-Reply-To:References:From:To:Cc:Subject:MIME-Version: Content-Disposition:Content-Type:Message-Id:Date; b=ekZyRzZGjDe7xh8XSUEB5D2Tm86lKiBCgZzmrY+zUXNqHD3I5PLWmj2FygaT/jW77NfLyHMkzlQrVICVY2fhvlMv3+WqPAll4A5/3b7F4h3MPy7LXVT/YbY+ycqOLkwvxjskHI2oKFcT0VY7fhqIrSNX/VSEVTtlVFcis7XGnrQ= 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=CuuAsQa4; 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="CuuAsQa4" 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=WWguanKzx4dLZRgBponms/+CBeTYJZLbKyDkuByIfqc=; b=CuuAsQa4bAH3tXb/dmTr3ZZ+fd sUY8ogWIktZcmDMwCWRzZKr1dKoenMtVFi5f6ab/hlN3BZUXaokEG3pupHNzpi3V3Kx8AOXVuaeYl GndPgI7h/ftkHM06g0orT7APVHZQ53wZk+GEtNkgMNu4nG31BVL9sj3rU5eQs5rMuE1MED3p8uY+B Ku7IEKwCe+n68u40VJDUIGgWWacqP0rDQUBwTZZyuKFfCvCe4Bx0j59eb+eQJAmZfshvMZNgYsitV XWJKN3Aug4WFh8EAglXrjpmrr2jlAzThnKGJZqaQsw3X99EzGc3x9bMz35Sp8ZdR3bOSFIyO/SfvI KIvStadw==; Received: from e0022681537dd.dyn.armlinux.org.uk ([fd8f:7570:feb6:1:222:68ff:fe15:37dd]:42828 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 1w1LWL-0000000021T-43Wt; Sat, 14 Mar 2026 09:42:58 +0000 Received: from rmk by rmk-PC.armlinux.org.uk with local (Exim 4.98.2) (envelope-from ) id 1w1LWJ-0000000DGSL-2jWd; Sat, 14 Mar 2026 09:42:55 +0000 In-Reply-To: References: From: "Russell King (Oracle)" To: Andrew Lunn Cc: Alexandre Torgue , Alexei Starovoitov , Andrew Lunn , bpf@vger.kernel.org, Daniel Borkmann , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Jesper Dangaard Brouer , linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, netdev@vger.kernel.org, Paolo Abeni , Stanislav Fomichev Subject: [PATCH net-next v4 07/15] net: stmmac: remove rx_tail_addr 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: Sat, 14 Mar 2026 09:42:55 +0000 There is only one place where rx_q->rx_tail_addr is used - the new stmmac_set_queue_rx_tail_ptr(). Make this a local variable and remove it from struct stmmac_rx_queue. This commit does not change the semantics - the hardware relies upon the descriptor ring not crossing a 4GiB boundary as the high address bits are programmed into a separate register via stmmac_init_rx_chan(). Hence, truncating the DMA address to 32-bit is fine as the register it will be programmed into is 32-bit, and the high bits are handled elsewhere. Signed-off-by: Russell King (Oracle) --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 - drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 5 +++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/net/ethernet/stmicro/stmmac/stmmac.h index b096a9e090e3..d1f8383d1c04 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac.h +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac.h @@ -131,7 +131,6 @@ struct stmmac_rx_queue { unsigned int buf_alloc_num; unsigned int napi_skb_frag_size; dma_addr_t dma_rx_phy; - u32 rx_tail_addr; unsigned int state_saved; struct { struct sk_buff *skb; diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index 8823f8f5b053..1d40168ec68d 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -388,8 +388,9 @@ static void stmmac_set_queue_rx_tail_ptr(struct stmmac_priv *priv, * descriptiors are only supported with dwmac1000 (rx_tail_addr = rx_q->dma_rx_phy + index * sizeof(struct dma_desc); - stmmac_set_rx_tail_ptr(priv, priv->ioaddr, rx_q->rx_tail_addr, chan); + u32 rx_tail_addr = rx_q->dma_rx_phy + index * sizeof(struct dma_desc); + + stmmac_set_rx_tail_ptr(priv, priv->ioaddr, rx_tail_addr, chan); } /** -- 2.47.3