Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'net-macb-fix-ethernet-malfunction-on-amd-versal-board-after-suspend'

Kevin Hao says:

====================
net: macb: Fix Ethernet malfunction on AMD Versal board after suspend

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.
====================

Link: https://patch.msgid.link/20260312-macb-versal-v1-0-467647173fa4@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

+19 -4
+19 -4
drivers/net/ethernet/cadence/macb_main.c
··· 2669 2669 desc->ctrl = 0; 2670 2670 } 2671 2671 2672 + static void gem_init_rx_ring(struct macb_queue *queue) 2673 + { 2674 + queue->rx_tail = 0; 2675 + queue->rx_prepared_head = 0; 2676 + 2677 + gem_rx_refill(queue); 2678 + } 2679 + 2672 2680 static void gem_init_rings(struct macb *bp) 2673 2681 { 2674 2682 struct macb_queue *queue; ··· 2694 2686 queue->tx_head = 0; 2695 2687 queue->tx_tail = 0; 2696 2688 2697 - queue->rx_tail = 0; 2698 - queue->rx_prepared_head = 0; 2699 - 2700 - gem_rx_refill(queue); 2689 + gem_init_rx_ring(queue); 2701 2690 } 2702 2691 2703 2692 macb_init_tieoff(bp); ··· 5952 5947 rtnl_unlock(); 5953 5948 } 5954 5949 5950 + if (!(bp->caps & MACB_CAPS_MACB_IS_EMAC)) 5951 + macb_init_buffers(bp); 5952 + 5955 5953 for (q = 0, queue = bp->queues; q < bp->num_queues; 5956 5954 ++q, ++queue) { 5955 + if (!(bp->caps & MACB_CAPS_MACB_IS_EMAC)) { 5956 + if (macb_is_gem(bp)) 5957 + gem_init_rx_ring(queue); 5958 + else 5959 + macb_init_rx_ring(queue); 5960 + } 5961 + 5957 5962 napi_enable(&queue->napi_rx); 5958 5963 napi_enable(&queue->napi_tx); 5959 5964 }