From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.b="PKlUHei4" Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [IPv6:2001:4b98:dc4:8::222]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1F08019A2 for ; Fri, 24 Nov 2023 07:09:25 -0800 (PST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 6E99D40016; Fri, 24 Nov 2023 15:09:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1700838564; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=kdneLdQtosT/1Jsu3ffIIlGLAwKem6GqvHil4BjQ5vY=; b=PKlUHei4HMuOdPC0gO0/8wbvWRsY09RLrQZDqljb2e113q5tDn9+FxmwmIQ5c/+VInBJMx I6aVp1jNK8rSgZ7wbL0CqcrH/EFq8Roj6YVyfYP9Kw2i0RaqhDMocLuRLS494BMDj7eAhe 3HyK+0xkERgz5BcC4zAgy/QiheRiV8J9F10RMIPO8Q5PdkjVjoLhBxkWRsUIUaTbZwKgit 2t7ddWpNADhDKvqNkcXhT6L+nVwZZFlUdfgpmsqm0KSq91rwP8cYAvMKbNuYPR1K2TVJAK odyu0trY1JD4etZ8MBRYqvI4M4zbbZuAXrMa9o9wtYUFR8v6KZ/RaZs0FaRITQ== From: Miquel Raynal To: Vinod Koul , Lizhi Hou , Brian Xu , Raj Kumar Rampelli , dmaengine@vger.kernel.org Cc: Michal Simek , Thomas Petazzoni , Miquel Raynal Subject: [PATCH 2/3] dmaengine: xilinx: xdma: Better handling of the busy variable Date: Fri, 24 Nov 2023 16:09:22 +0100 Message-Id: <20231124150923.257687-3-miquel.raynal@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231124150923.257687-1-miquel.raynal@bootlin.com> References: <20231124150923.257687-1-miquel.raynal@bootlin.com> Precedence: bulk X-Mailing-List: dmaengine@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: miquel.raynal@bootlin.com The driver internal scatter-gather logic is: - set busy to true - start transfer - set busy to false - trigger next transfer if any - set busy to true Setting busy to false in cyclic transfers does not make any sense and is conceptually wrong. In order to ease the integration of additional callbacks let's move this change to a scatter-gather-only path. Signed-off-by: Miquel Raynal --- --- drivers/dma/xilinx/xdma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/xilinx/xdma.c b/drivers/dma/xilinx/xdma.c index 75533e787414..caddd741a79c 100644 --- a/drivers/dma/xilinx/xdma.c +++ b/drivers/dma/xilinx/xdma.c @@ -745,7 +745,6 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id) if (!vd) goto out; - xchan->busy = false; desc = to_xdma_desc(vd); xdev = xchan->xdev_hdl; @@ -768,6 +767,8 @@ static irqreturn_t xdma_channel_isr(int irq, void *dev_id) goto out; } + xchan->busy = false; + /* * if all data blocks are transferred, remove and complete the request */ -- 2.34.1