dmaengine: idxd: cleanup workqueue config after disabling
authorDave Jiang <dave.jiang@intel.com>
Thu, 25 Jun 2020 19:17:42 +0000 (12:17 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 22 Jul 2020 07:34:07 +0000 (09:34 +0200)
commit2a2df2bd10de44c3804661ed15157817c12d6291
tree0241d9ad93317c8e27a66dc0de42ee28a02c31b4
parentd8fbb2b8ac3726787bbbb9df7cbc1b326c8e6c6a
dmaengine: idxd: cleanup workqueue config after disabling

[ Upstream commit da32b28c95a79e399e18c03f8178f41aec9c66e4 ]

After disabling a device, we should clean up the internal state for
the wqs and zero out the configuration registers. Without doing so can cause
issues when the user reprogram the wqs.

Fixes: c52ca478233c ("dmaengine: idxd: add configuration component of driver")
Reported-by: Yixin Zhang <yixin.zhang@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Tested-by: Yixin Zhang <yixin.zhang@intel.com>
Link: https://lore.kernel.org/r/159311264246.1198.11955791213681679428.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/dma/idxd/device.c
drivers/dma/idxd/idxd.h
drivers/dma/idxd/sysfs.c