Takashi Iwai 2f37fe
From 5edc24ac876a928f36f407a0fcdb33b94a3a210f Mon Sep 17 00:00:00 2001
Takashi Iwai 2f37fe
From: Tudor Ambarus <tudor.ambarus@microchip.com>
Takashi Iwai 2f37fe
Date: Wed, 15 Dec 2021 13:01:06 +0200
Takashi Iwai 2f37fe
Subject: [PATCH] dmaengine: at_xdmac: Print debug message after realeasing the lock
Takashi Iwai 2f37fe
Git-commit: 5edc24ac876a928f36f407a0fcdb33b94a3a210f
Takashi Iwai 2f37fe
Patch-mainline: v5.17-rc1
Takashi Iwai 2f37fe
References: git-fixes
Takashi Iwai 2f37fe
Takashi Iwai 2f37fe
It is desirable to do the prints without the lock held if possible, so
Takashi Iwai 2f37fe
move the print after the lock is released.
Takashi Iwai 2f37fe
Takashi Iwai 2f37fe
Fixes: e1f7c9eee707 ("dmaengine: at_xdmac: creation of the atmel eXtended DMA Controller driver")
Takashi Iwai 2f37fe
Signed-off-by: Tudor Ambarus <tudor.ambarus@microchip.com>
Takashi Iwai 2f37fe
Link: https://lore.kernel.org/r/20211215110115.191749-4-tudor.ambarus@microchip.com
Takashi Iwai 2f37fe
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Takashi Iwai 2f37fe
Acked-by: Takashi Iwai <tiwai@suse.de>
Takashi Iwai 2f37fe
Takashi Iwai 2f37fe
---
Takashi Iwai 2f37fe
 drivers/dma/at_xdmac.c | 6 ++++--
Takashi Iwai 2f37fe
 1 file changed, 4 insertions(+), 2 deletions(-)
Takashi Iwai 2f37fe
Takashi Iwai 2f37fe
diff --git a/drivers/dma/at_xdmac.c b/drivers/dma/at_xdmac.c
Takashi Iwai 2f37fe
index c3d3e1270236..7d3560acedbb 100644
Takashi Iwai 2f37fe
--- a/drivers/dma/at_xdmac.c
Takashi Iwai 2f37fe
+++ b/drivers/dma/at_xdmac.c
Takashi Iwai 2f37fe
@@ -473,10 +473,12 @@ static dma_cookie_t at_xdmac_tx_submit(struct dma_async_tx_descriptor *tx)
Takashi Iwai 2f37fe
 	spin_lock_irqsave(&atchan->lock, irqflags);
Takashi Iwai 2f37fe
 	cookie = dma_cookie_assign(tx);
Takashi Iwai 2f37fe
 
Takashi Iwai 2f37fe
-	dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n",
Takashi Iwai 2f37fe
-		 __func__, atchan, desc);
Takashi Iwai 2f37fe
 	list_add_tail(&desc->xfer_node, &atchan->xfers_list);
Takashi Iwai 2f37fe
 	spin_unlock_irqrestore(&atchan->lock, irqflags);
Takashi Iwai 2f37fe
+
Takashi Iwai 2f37fe
+	dev_vdbg(chan2dev(tx->chan), "%s: atchan 0x%p, add desc 0x%p to xfers_list\n",
Takashi Iwai 2f37fe
+		 __func__, atchan, desc);
Takashi Iwai 2f37fe
+
Takashi Iwai 2f37fe
 	return cookie;
Takashi Iwai 2f37fe
 }
Takashi Iwai 2f37fe
 
Takashi Iwai 2f37fe
-- 
Takashi Iwai 2f37fe
2.31.1
Takashi Iwai 2f37fe