dmaengine: ioat: fixing the wrong dma_dev->chancnt
authorYajun Deng <yajun.deng@linux.dev>
Tue, 15 Aug 2023 06:11:51 +0000 (14:11 +0800)
committerVinod Koul <vkoul@kernel.org>
Mon, 21 Aug 2023 13:08:19 +0000 (18:38 +0530)
commitf4f84fb632b30580f11133fb81372338da2229f5
treeca441fbc65c551798a0f7f062b095c1ef2f8a637
parent81ebed8aa2c213939a4670f508031a57d4ecbb70
dmaengine: ioat: fixing the wrong dma_dev->chancnt

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.

Add chancnt member to the struct ioatdma_device, ioat_dma->chancnt
is used in ioat, dma_dev->chancnt is used in dmaengine.

Signed-off-by: Yajun Deng <yajun.deng@linux.dev>
Reviewed-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/20230815061151.2724474-1-yajun.deng@linux.dev
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/ioat/dma.h
drivers/dma/ioat/init.c