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 79C61241C8C; Mon, 23 Mar 2026 15:15:52 +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=1774278952; cv=none; b=cLjzyohOuzfRE7qoxKC3o1WSK4/m5pGPjWMiYAWAqmn/83dSnPPymoPgA5FE8femrMGTlLImhDRSo6BG27rTL0EkC392yPs8AezHyKFyQiyagIBJ2LukNLniUhcRt91NPppro2ydec0LqLUOwIzqcePyoYcsm8AaIGxOTR62quc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774278952; c=relaxed/simple; bh=9hMgPdLU2XkNaWlbLHcZyVtoDhGajhKqK39L+Cg0t10=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=lSem1orvb1VhSg4fCe8VIa8D9v8HdIP/Wbea2t4oi7TH0SXMAeCRg3N+mIPgT2IZlUyBcC0egQSZgRdQgM1rGCIP1RXLBq2S5lLiT7XonWtD63Vi48LcYYhZ0GUUJiLF/GMVutK22g9mb2aDRT1YIxdkHfXiwmt40FwiyY2rec8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=DwvZ/3Jk; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="DwvZ/3Jk" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 81D56C2BCB4; Mon, 23 Mar 2026 15:15:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774278952; bh=9hMgPdLU2XkNaWlbLHcZyVtoDhGajhKqK39L+Cg0t10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DwvZ/3JkkTHUyg/xosxmHDUwbjUUedQsmiJjCjPzPPmoCPNj1r1/ahBIgNNPQVeX0 bnrjWfRVr1A48jzQJkGDJjGHyxQ/QEkdHgs9qBAXqkokqeSe1VRbQ5q3HouMG2fIJJ SxlYBUoFCyHdqK1AYrqIUVm9V3V7X8dinb7no2W4= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Kevin Hao , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.6 472/567] net: macb: Introduce gem_init_rx_ring() Date: Mon, 23 Mar 2026 14:46:32 +0100 Message-ID: <20260323134545.667300360@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323134533.749096647@linuxfoundation.org> References: <20260323134533.749096647@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ 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 Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/cadence/macb_main.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -2700,6 +2700,14 @@ static void macb_init_tieoff(struct macb 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; @@ -2717,10 +2725,7 @@ static void gem_init_rings(struct macb * 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);