dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] dmaengine: ioat: fixing the wrong chancnt
@ 2023-08-11  8:16 Yajun Deng
  2023-08-11 15:40 ` Dave Jiang
  0 siblings, 1 reply; 4+ messages in thread
From: Yajun Deng @ 2023-08-11  8:16 UTC (permalink / raw)
  To: vkoul, bhelgaas, dave.jiang; +Cc: dmaengine, linux-kernel, Yajun Deng

The chancnt would be updated in __dma_async_device_channel_register(),
but it was assigned in ioat_enumerate_channels(). Therefore chancnt has
the wrong value.

Clear chancnt before calling dma_async_device_register().

Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
---
 drivers/dma/ioat/init.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/ioat/init.c b/drivers/dma/ioat/init.c
index c4602bfc9c74..928fc8a83a36 100644
--- a/drivers/dma/ioat/init.c
+++ b/drivers/dma/ioat/init.c
@@ -536,8 +536,11 @@ static int ioat_probe(struct ioatdma_device *ioat_dma)
 
 static int ioat_register(struct ioatdma_device *ioat_dma)
 {
-	int err = dma_async_device_register(&ioat_dma->dma_dev);
+	int err;
+
+	ioat_dma->dma_dev.chancnt = 0;
 
+	err = dma_async_device_register(&ioat_dma->dma_dev);
 	if (err) {
 		ioat_disable_interrupts(ioat_dma);
 		dma_pool_destroy(ioat_dma->completion_pool);
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-08-14 15:08 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-08-11  8:16 [PATCH] dmaengine: ioat: fixing the wrong chancnt Yajun Deng
2023-08-11 15:40 ` Dave Jiang
2023-08-13  8:59   ` Yajun Deng
2023-08-14 15:06     ` Dave Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).