From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 38BCF279DC8 for ; Fri, 20 Mar 2026 15:08:56 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774019336; cv=none; b=iEYBn8nRMeJeT/ObCK9oeQNN0oLzCvQdjaUraeLiwA6cH5llAwAkzfI+P2Serinur4Eono+UtIu5quAsGBF+ruhpI/PlNsArJ0s6vFYcH8jmj5lnQCXDWMSUjLTaYlVJiFokMsQqXP361gQ5tYvbEMVmfP/suFYkUMn/sSJ0eSA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774019336; c=relaxed/simple; bh=0sYby9ZtHXh+hi4xOzy32GQYL42EvP7PbLzB0UZ5w9o=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=aUYa9ewU3jqRkFF1E52qqmWpldgnIwmPuUZFFy/FG+1GqNtSChVXbSJhz/DdIJBa/KLZUNRY3HoiNnR2L/ZDp3C4Joypd0NcaX0gT6YKXvZ3GzQn7sykTw4ryFRHX2fOfsiXalt69MXSVTlKqLi+o7na3I46XnAkHjwgQ0QCUcY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=OviWkPUc; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="OviWkPUc" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52B4BC19425; Fri, 20 Mar 2026 15:08:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1774019335; bh=0sYby9ZtHXh+hi4xOzy32GQYL42EvP7PbLzB0UZ5w9o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OviWkPUcEhaBtqeOjt0HxR43NbUtCx2krcepZQ49tvN2YmWs4Kw0UXzRzURl5ynUy HJy+kHvu8QMXHVHwRsXNREDehZKFuowgr6NGfVaUQ63TFZ+H7INSRDQTnGuIB0YBss +6ljCoZu+Bc9MR4grnjJekx5f0pcYZ52764f/Jhlo4U1x28EnTn988p1MfKvAgFuHy H6mrbElJhoYRRQvv0ikR9iglWM/jK4b7ZWeX/oSdV3R45gJo/BIN7md0KshDvdW660 iqa1PlpRlwqKQK1+5ok3xZ3O4aJ0FtTCtTRZnQQs8TUrNeLWEhPsI+Gfb39sxW25CA VEjieY2inIZog== From: Sasha Levin To: stable@vger.kernel.org Cc: Kevin Hao , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.1.y 2/3] net: macb: Introduce gem_init_rx_ring() Date: Fri, 20 Mar 2026 11:08:51 -0400 Message-ID: <20260320150852.4191566-2-sashal@kernel.org> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260320150852.4191566-1-sashal@kernel.org> References: <2026032002-habitual-dolly-4a11@gregkh> <20260320150852.4191566-1-sashal@kernel.org> Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Kevin Hao [ Upstream commit 1a7124ecd655bcaf1845197fe416aa25cff4c3ea ] 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 Reviewed-by: Simon Horman Link: https://patch.msgid.link/20260312-macb-versal-v1-1-467647173fa4@gmail.com Signed-off-by: Jakub Kicinski Stable-dep-of: 718d0766ce4c ("net: macb: Reinitialize tx/rx queue pointer registers and rx ring during resume") Signed-off-by: Sasha Levin --- drivers/net/ethernet/cadence/macb_main.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/cadence/macb_main.c b/drivers/net/ethernet/cadence/macb_main.c index 043491cadcb7f..7374e9da71f1d 100644 --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -2546,6 +2546,14 @@ static void macb_init_tieoff(struct macb *bp) desc->ctrl = 0; } +static void gem_init_rx_ring(struct macb_queue *queue) +{ + queue->rx_tail = 0; + queue->rx_prepared_head = 0; + + gem_rx_refill(queue); +} + static void gem_init_rings(struct macb *bp) { struct macb_queue *queue; @@ -2563,10 +2571,7 @@ static void gem_init_rings(struct macb *bp) queue->tx_head = 0; queue->tx_tail = 0; - queue->rx_tail = 0; - queue->rx_prepared_head = 0; - - gem_rx_refill(queue); + gem_init_rx_ring(queue); } macb_init_tieoff(bp); -- 2.51.0