Skip to content
/ linux Public

Commit 4e1436e

Browse files
haokexingregkh
authored andcommitted
net: macb: Introduce gem_init_rx_ring()
[ Upstream commit 1a7124e ] Extract the initialization code for the GEM RX ring into a new function. This change will be utilized in a subsequent patch. No functional changes are introduced. Signed-off-by: Kevin Hao <haokexin@gmail.com> Reviewed-by: Simon Horman <horms@kernel.org> Link: https://patch.msgid.link/20260312-macb-versal-v1-1-467647173fa4@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org> Stable-dep-of: 718d076 ("net: macb: Reinitialize tx/rx queue pointer registers and rx ring during resume") Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 4ab7c9f commit 4e1436e

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

drivers/net/ethernet/cadence/macb_main.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2614,6 +2614,14 @@ static void macb_init_tieoff(struct macb *bp)
26142614
desc->ctrl = 0;
26152615
}
26162616

2617+
static void gem_init_rx_ring(struct macb_queue *queue)
2618+
{
2619+
queue->rx_tail = 0;
2620+
queue->rx_prepared_head = 0;
2621+
2622+
gem_rx_refill(queue);
2623+
}
2624+
26172625
static void gem_init_rings(struct macb *bp)
26182626
{
26192627
struct macb_queue *queue;
@@ -2631,10 +2639,7 @@ static void gem_init_rings(struct macb *bp)
26312639
queue->tx_head = 0;
26322640
queue->tx_tail = 0;
26332641

2634-
queue->rx_tail = 0;
2635-
queue->rx_prepared_head = 0;
2636-
2637-
gem_rx_refill(queue);
2642+
gem_init_rx_ring(queue);
26382643
}
26392644

26402645
macb_init_tieoff(bp);

0 commit comments

Comments
 (0)