* [PATCH net 2/2] net: macb: Reinitialize tx/rx queue pointer registers and rx ring during resume
2026-03-12 8:13 [PATCH net 0/2] net: macb: Fix Ethernet malfunction on AMD Versal board after suspend Kevin Hao
@ 2026-03-12 8:13 ` Kevin Hao
2026-03-13 14:12 ` [PATCH net 0/2] net: macb: Fix Ethernet malfunction on AMD Versal board after suspend Simon Horman
2026-03-14 19:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Kevin Hao @ 2026-03-12 8:13 UTC (permalink / raw)
To: netdev
Cc: Nicolas Ferre, Claudiu Beznea, Andrew Lunn, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Kevin Hao,
Quanyang Wang, stable
On certain platforms, such as AMD Versal boards, the tx/rx queue pointer
registers are cleared after suspend, and the rx queue pointer register
is also disabled during suspend if WOL is enabled. Previously, we assumed
that these registers would be restored by macb_mac_link_up(). However,
in commit bf9cf80cab81, macb_init_buffers() was moved from
macb_mac_link_up() to macb_open(). Therefore, we should call
macb_init_buffers() to reinitialize the tx/rx queue pointer registers
during resume.
Due to the reset of these two registers, we also need to adjust the
tx/rx rings accordingly. The tx ring will be handled by
gem_shuffle_tx_rings() in macb_mac_link_up(), so we only need to
initialize the rx ring here.
Fixes: bf9cf80cab81 ("net: macb: Fix tx/rx malfunction after phy link down and up")
Reported-by: Quanyang Wang <quanyang.wang@windriver.com>
Signed-off-by: Kevin Hao <haokexin@gmail.com>
Tested-by: Quanyang Wang <quanyang.wang@windriver.com>
Cc: stable@vger.kernel.org
---
drivers/net/ethernet/cadence/macb_main.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c
index 67f7ecb05a7d6b8a5f49da588faafe1aa70d0d2b..100f478c0d30e4a91021a7da83f8f08606eca66e 100644
--- a/drivers/net/ethernet/cadence/macb_main.c
+++ b/drivers/net/ethernet/cadence/macb_main.c
@@ -6106,8 +6106,18 @@ static int __maybe_unused macb_resume(struct device *dev)
rtnl_unlock();
}
+ if (!(bp->caps & MACB_CAPS_MACB_IS_EMAC))
+ macb_init_buffers(bp);
+
for (q = 0, queue = bp->queues; q < bp->num_queues;
++q, ++queue) {
+ if (!(bp->caps & MACB_CAPS_MACB_IS_EMAC)) {
+ if (macb_is_gem(bp))
+ gem_init_rx_ring(queue);
+ else
+ macb_init_rx_ring(queue);
+ }
+
napi_enable(&queue->napi_rx);
napi_enable(&queue->napi_tx);
}
--
2.53.0
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net 0/2] net: macb: Fix Ethernet malfunction on AMD Versal board after suspend
2026-03-12 8:13 [PATCH net 0/2] net: macb: Fix Ethernet malfunction on AMD Versal board after suspend Kevin Hao
2026-03-12 8:13 ` [PATCH net 2/2] net: macb: Reinitialize tx/rx queue pointer registers and rx ring during resume Kevin Hao
@ 2026-03-13 14:12 ` Simon Horman
2026-03-14 19:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2026-03-13 14:12 UTC (permalink / raw)
To: Kevin Hao
Cc: netdev, Nicolas Ferre, Claudiu Beznea, Andrew Lunn,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
Quanyang Wang, stable
On Thu, Mar 12, 2026 at 04:13:57PM +0800, Kevin Hao wrote:
> Hi,
>
> On Versal boards, the tx/rx queue pointer registers are cleared after suspend,
> which causes Ethernet malfunction. This patch series addresses this issue by
> reinitializing the tx/rx queue pointer registers and the rx ring.
>
> ---
> Cc: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: Claudiu Beznea <claudiu.beznea@tuxon.dev>
> Cc: Andrew Lunn <andrew+netdev@lunn.ch>
> Cc: "David S. Miller" <davem@davemloft.net>
> Cc: Eric Dumazet <edumazet@google.com>
> Cc: Jakub Kicinski <kuba@kernel.org>
> Cc: Paolo Abeni <pabeni@redhat.com>
>
> ---
> Kevin Hao (2):
> net: macb: Introduce gem_init_rx_ring()
> net: macb: Reinitialize tx/rx queue pointer registers and rx ring during resume
>
> drivers/net/ethernet/cadence/macb_main.c | 23 +++++++++++++++++++----
> 1 file changed, 19 insertions(+), 4 deletions(-)
For the series,
Reviewed-by: Simon Horman <horms@kernel.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net 0/2] net: macb: Fix Ethernet malfunction on AMD Versal board after suspend
2026-03-12 8:13 [PATCH net 0/2] net: macb: Fix Ethernet malfunction on AMD Versal board after suspend Kevin Hao
2026-03-12 8:13 ` [PATCH net 2/2] net: macb: Reinitialize tx/rx queue pointer registers and rx ring during resume Kevin Hao
2026-03-13 14:12 ` [PATCH net 0/2] net: macb: Fix Ethernet malfunction on AMD Versal board after suspend Simon Horman
@ 2026-03-14 19:30 ` patchwork-bot+netdevbpf
2 siblings, 0 replies; 4+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-14 19:30 UTC (permalink / raw)
To: Kevin Hao
Cc: netdev, nicolas.ferre, claudiu.beznea, andrew+netdev, davem,
edumazet, kuba, pabeni, quanyang.wang, stable
Hello:
This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:
On Thu, 12 Mar 2026 16:13:57 +0800 you wrote:
> Hi,
>
> On Versal boards, the tx/rx queue pointer registers are cleared after suspend,
> which causes Ethernet malfunction. This patch series addresses this issue by
> reinitializing the tx/rx queue pointer registers and the rx ring.
>
>
> [...]
Here is the summary with links:
- [net,1/2] net: macb: Introduce gem_init_rx_ring()
https://git.kernel.org/netdev/net/c/1a7124ecd655
- [net,2/2] net: macb: Reinitialize tx/rx queue pointer registers and rx ring during resume
https://git.kernel.org/netdev/net/c/718d0766ce4c
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 4+ messages in thread