dmaengine: idxd: skip clearing device context when device is read-only
authorDave Jiang <dave.jiang@intel.com>
Mon, 11 Apr 2022 22:06:34 +0000 (15:06 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 27 Apr 2022 12:41:04 +0000 (14:41 +0200)
commitbad2e51e49f1d5442f4863d39f308fb36104f490
treec62551438efb188d4083c17481007946531ed2c1
parent54fd7e00419628d13b0cc3d41d8484d7029a3afb
dmaengine: idxd: skip clearing device context when device is read-only

[ Upstream commit 1cd8e751d96c43ece3f6842ac2244a37d9332c3a ]

If the device shows up as read-only configuration, skip the clearing of the
state as the context must be preserved for device re-enable after being
disabled.

Fixes: 0dcfe41e9a4c ("dmanegine: idxd: cleanup all device related bits after disabling device")
Reported-by: Tony Zhu <tony.zhu@intel.com>
Tested-by: Tony Zhu <tony.zhu@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/164971479479.2200566.13980022473526292759.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