dmaengine: idxd: fix wq settings post wq disable
authorDave Jiang <dave.jiang@intel.com>
Tue, 14 Dec 2021 20:15:17 +0000 (13:15 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 27 Jan 2022 10:05:23 +0000 (11:05 +0100)
commitdcb7718a80736bfffed7362493a931040c8a78da
tree43a61e069427ef2205587900c41bf8a0b0029290
parentd87eb22b94f6068b159412c4e7a3e446f3da7953
dmaengine: idxd: fix wq settings post wq disable

commit 0f225705cf6536826318180831e18a74595efc8d upstream.

By the spec, wq size and group association is not changeable unless device
is disabled. Exclude clearing the shadow copy on wq disable/reset. This
allows wq type to be changed after disable to be re-enabled.

Move the size and group association to its own cleanup and only call it
during device disable.

Fixes: 0dcfe41e9a4c ("dmanegine: idxd: cleanup all device related bits after disabling device")
Reported-by: Lucas Van <lucas.van@intel.com>
Tested-by: Lucas Van <lucas.van@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/163951291732.2987775.13576571320501115257.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/dma/idxd/device.c