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 339E723AB9D; Mon, 23 Mar 2026 14:46:00 +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=1774277160; cv=none; b=ODlUB5AGvBh1axfIwjGNtkr7yFBsmzyGCSZdDKABo48QpRfPmaGYPCEkWgOARODLcjO3DR8PHePvMyJvMAlpIO8lXAlHsYFNbXwxtmtOknVn2k9wZtYtrk1Z94jNUgD0VGT2xl2EBwV20sRdw6BmOeyR/gZ/qKkf+VKfD6jZIJ4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774277160; c=relaxed/simple; bh=TOISTTeIpRlbA80MBxa4ivSyumZkkUBALtLfs2/f+wk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AqwlRT4BqgbitkkjzkbivaezN0OwuZuuH3yGj9Nx5KeyLDh/95c59xcxPy87V232tC+Uial0QOgBCR/m6j0cGzAY/3kSX2PYqOeXDP/kEn8SUBCUIeXkf6FGI1oQdyPiVwDQZxN0WHgFxULLvnVGGEusLFyL93/JyckSO6FIxqo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=OR/3bx9K; 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="OR/3bx9K" Received: by smtp.kernel.org (Postfix) with ESMTPSA id A49F2C4CEF7; Mon, 23 Mar 2026 14:45:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1774277160; bh=TOISTTeIpRlbA80MBxa4ivSyumZkkUBALtLfs2/f+wk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OR/3bx9KqdXGeUblrFKxTVm/n7LBkexn6ZbfS5veWrGQ5h5Jm1h7he3bkwrU2OmEe H7dSp2l5h092sbgejtu7Po3jRhhLUJ9Bb9Vr4a2mj59qmyhvYC4I2gC3di8JS5eu0+ Kz2JZ+h7nJ294lYf/5bHmIQshCaaWo03MG2pYoGA= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Quanyang Wang , Kevin Hao , Simon Horman , Jakub Kicinski , Sasha Levin Subject: [PATCH 6.12 333/460] net: macb: Reinitialize tx/rx queue pointer registers and rx ring during resume Date: Mon, 23 Mar 2026 14:45:29 +0100 Message-ID: <20260323134534.711162592@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260323134526.647552166@linuxfoundation.org> References: <20260323134526.647552166@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.12-stable review patch. If anyone has any objections, please let me know. ------------------ From: Kevin Hao [ Upstream commit 718d0766ce4c7634ce62fa78b526ea7263487edd ] 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 Signed-off-by: Kevin Hao Tested-by: Quanyang Wang Cc: stable@vger.kernel.org Reviewed-by: Simon Horman Link: https://patch.msgid.link/20260312-macb-versal-v1-2-467647173fa4@gmail.com Signed-off-by: Jakub Kicinski Signed-off-by: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/cadence/macb_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) --- a/drivers/net/ethernet/cadence/macb_main.c +++ b/drivers/net/ethernet/cadence/macb_main.c @@ -5527,8 +5527,18 @@ static int __maybe_unused macb_resume(st 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); }