]> git.baikalelectronics.ru Git - kernel.git/commit
dmaengine: idxd: check device state before issue command
authorDave Jiang <dave.jiang@intel.com>
Mon, 1 Feb 2021 15:26:14 +0000 (08:26 -0700)
committerVinod Koul <vkoul@kernel.org>
Wed, 3 Feb 2021 11:27:12 +0000 (16:57 +0530)
commit834b815863edafea73b9a47badc5fc80e4c946dc
treebf10672138ec53bf2e4db538a6667e374c75bfb0
parent97d0e1f631e5d016d56aabbee21a604c80e5d7e1
dmaengine: idxd: check device state before issue command

Add device state check before executing command. Without the check the
command can be issued while device is in halt state and causes the driver to
block while waiting for the completion of the command.

Reported-by: Sanjay Kumar <sanjay.k.kumar@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Tested-by: Sanjay Kumar <sanjay.k.kumar@intel.com>
Fixes: 9c8833b2fb92 ("dmaengine: idxd: add work queue drain support")
Link: https://lore.kernel.org/r/161219313921.2976211.12222625226450097465.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/device.c
drivers/dma/idxd/idxd.h
drivers/dma/idxd/init.c