dmaengine: idxd: reconfig device after device reset command
authorDave Jiang <dave.jiang@intel.com>
Thu, 2 Sep 2021 00:18:05 +0000 (17:18 -0700)
committerVinod Koul <vkoul@kernel.org>
Mon, 25 Oct 2021 06:39:15 +0000 (12:09 +0530)
Device reset clears the MSIXPERM table and the device registers. Re-program
the MSIXPERM table and re-enable the error interrupts post reset.

Fixes: 745e92a6d816 ("dmaengine: idxd: idxd: move remove() bits for idxd 'struct device' to device.c")
Reported-by: Sanjay Kumar <sanjay.k.kumar@intel.com>
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Link: https://lore.kernel.org/r/163054188513.2853562.12077053294595278181.stgit@djiang5-desk3.ch.intel.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>
drivers/dma/idxd/device.c

index ef3281fc3f8bae9bf787c4228b7d618cb1483b57..b1407465d5c48622e8b18cadafbce123159905d6 100644 (file)
@@ -583,6 +583,8 @@ void idxd_device_reset(struct idxd_device *idxd)
        spin_lock(&idxd->dev_lock);
        idxd_device_clear_state(idxd);
        idxd->state = IDXD_DEV_DISABLED;
+       idxd_unmask_error_interrupts(idxd);
+       idxd_msix_perm_setup(idxd);
        spin_unlock(&idxd->dev_lock);
 }