Message ID | 164971479479.2200566.13980022473526292759.stgit@djiang5-desk3.ch.intel.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 1cd8e751d96c43ece3f6842ac2244a37d9332c3a |
Headers | show |
Series | dmaengine: idxd: skip clearing device context when device is read-only | expand |
On 11-04-22, 15:06, Dave Jiang wrote: > 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. Applied, thanks
diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c index 5a0535a0f850..f652da6ab47d 100644 --- a/drivers/dma/idxd/device.c +++ b/drivers/dma/idxd/device.c @@ -708,6 +708,9 @@ static void idxd_device_wqs_clear_state(struct idxd_device *idxd) void idxd_device_clear_state(struct idxd_device *idxd) { + if (!test_bit(IDXD_FLAG_CONFIGURABLE, &idxd->flags)) + return; + idxd_groups_clear_state(idxd); idxd_engines_clear_state(idxd); idxd_device_wqs_clear_state(idxd);