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 1227A24A05D; Wed, 25 Feb 2026 01:37:26 +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=1771983446; cv=none; b=pP6U4FKNpzJRbQVXHBdcFdVjRIcQPfGG8PUAV5+61g9h/LTO6ezgdbgu41j8Z9sQDpaNhsUAHmgid/B2WSd9TdWHdjvMbv7ihCjsYhZ5NBC0ze3pYNw5IJbvfcp5+2k39g+iK0xplrUvJ0+JsCSmBfOhZ5WmdCm2bDfRRLAkSa4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1771983446; c=relaxed/simple; bh=qZJjVIDE/zHlabxhX9QrTinaEPGCyu2y4o0oi5Y6xi8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=Jj/P2logA8PBLAW2zQpUKwofloOjDFK2jiFZlRWVgSQnO/aX1oVLE02qcUDCLaOGbiulu/UnixOaiPoHzl6U8BakL6+X5SkpG87SGa+OSsq101RVb53ZhAGfKde+sHuF+3+F1BbC2MW1Wz7xSxpe5JRD/4YeKsSZs+lPMBNAIqs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=trkISvzq; 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="trkISvzq" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C7DB6C116D0; Wed, 25 Feb 2026 01:37:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1771983446; bh=qZJjVIDE/zHlabxhX9QrTinaEPGCyu2y4o0oi5Y6xi8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=trkISvzqzHqq9Nm+qnbLRn/UEdIJg7QZg196fHh+mitrRaeqtdwWkkjeAiKnI4oZH SJ8jqWfwq1++Y2U8ICnUSct2B+eP+1sAL/rz8GilGhI3TWDpWuv8MvDkfSNo5Dw2QC NzLQbEP/Tq4ewKrWvJlxtOJm7jIt49ga0Y/Ckugw= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, =?UTF-8?q?Nuno=20S=C3=A1?= , Michael Hennerich , Vinod Koul , Sasha Levin Subject: [PATCH 6.19 562/781] dma: dma-axi-dmac: fix SW cyclic transfers Date: Tue, 24 Feb 2026 17:21:11 -0800 Message-ID: <20260225012413.584254646@linuxfoundation.org> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260225012359.695468795@linuxfoundation.org> References: <20260225012359.695468795@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: stable@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 6.19-stable review patch. If anyone has any objections, please let me know. ------------------ From: Nuno Sá [ Upstream commit 9bd257181fd5c996d922e9991500ad27987cfbf4 ] If 'hw_cyclic' is false we should still be able to do cyclic transfers in "software". That was not working for the case where 'desc->num_sgs' is 1 because 'chan->next_desc' is never set with the current desc which means that the cyclic transfer only runs once and in the next SOT interrupt we do nothing since vchan_next_desc() will return NULL. Fix it by setting 'chan->next_desc' as soon as we get a new desc via vchan_next_desc(). Fixes: 0e3b67b348b8 ("dmaengine: Add support for the Analog Devices AXI-DMAC DMA controller") Signed-off-by: Nuno Sá base-commit: 398035178503bf662281bbffb4bebce1460a4bc5 change-id: 20251104-axi-dmac-fixes-and-improvs-e3ad512a329c Acked-by: Michael Hennerich Link: https://patch.msgid.link/20251104-axi-dmac-fixes-and-improvs-v1-1-3e6fd9328f72@analog.com Signed-off-by: Vinod Koul Signed-off-by: Sasha Levin --- drivers/dma/dma-axi-dmac.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/dma/dma-axi-dmac.c b/drivers/dma/dma-axi-dmac.c index 5b06b0dc67ee1..e22639822045f 100644 --- a/drivers/dma/dma-axi-dmac.c +++ b/drivers/dma/dma-axi-dmac.c @@ -247,6 +247,7 @@ static void axi_dmac_start_transfer(struct axi_dmac_chan *chan) return; list_move_tail(&vdesc->node, &chan->active_descs); desc = to_axi_dmac_desc(vdesc); + chan->next_desc = desc; } sg = &desc->sg[desc->num_submitted]; @@ -265,8 +266,6 @@ static void axi_dmac_start_transfer(struct axi_dmac_chan *chan) else chan->next_desc = NULL; flags |= AXI_DMAC_FLAG_LAST; - } else { - chan->next_desc = desc; } sg->hw->id = axi_dmac_read(dmac, AXI_DMAC_REG_TRANSFER_ID); -- 2.51.0