All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] dmaengine: idxd: fix device cleanup on disable
@ 2022-04-05 21:53 Dave Jiang
  2022-04-08 17:57 ` Vinod Koul
  0 siblings, 1 reply; 2+ messages in thread
From: Dave Jiang @ 2022-04-05 21:53 UTC (permalink / raw)
  To: vkoul; +Cc: Tony Zhu, Tony Zhu, dmaengine

There are certain parts of WQ that needs to be cleaned up even after WQ is
disabled during the device disable. Those are the unchangeable parts for a
WQ when the device is still enabled. Move the cleanup outside of WQ state
check. Remove idxd_wq_disable_cleanup() inside idxd_wq_device_reset_cleanup()
since only the unchangeable parts need to be cleared.

Fixes: 0f225705cf65 ("dmaengine: idxd: fix wq settings post wq disable")
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>
---
 drivers/dma/idxd/device.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/dma/idxd/device.c b/drivers/dma/idxd/device.c
index 3061fe857d69..5a0535a0f850 100644
--- a/drivers/dma/idxd/device.c
+++ b/drivers/dma/idxd/device.c
@@ -373,7 +373,6 @@ static void idxd_wq_device_reset_cleanup(struct idxd_wq *wq)
 {
 	lockdep_assert_held(&wq->wq_lock);
 
-	idxd_wq_disable_cleanup(wq);
 	wq->size = 0;
 	wq->group = NULL;
 }
@@ -701,9 +700,9 @@ static void idxd_device_wqs_clear_state(struct idxd_device *idxd)
 
 		if (wq->state == IDXD_WQ_ENABLED) {
 			idxd_wq_disable_cleanup(wq);
-			idxd_wq_device_reset_cleanup(wq);
 			wq->state = IDXD_WQ_DISABLED;
 		}
+		idxd_wq_device_reset_cleanup(wq);
 	}
 }
 



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] dmaengine: idxd: fix device cleanup on disable
  2022-04-05 21:53 [PATCH] dmaengine: idxd: fix device cleanup on disable Dave Jiang
@ 2022-04-08 17:57 ` Vinod Koul
  0 siblings, 0 replies; 2+ messages in thread
From: Vinod Koul @ 2022-04-08 17:57 UTC (permalink / raw)
  To: Dave Jiang; +Cc: Tony Zhu, dmaengine

On 05-04-22, 14:53, Dave Jiang wrote:
> There are certain parts of WQ that needs to be cleaned up even after WQ is
> disabled during the device disable. Those are the unchangeable parts for a
> WQ when the device is still enabled. Move the cleanup outside of WQ state
> check. Remove idxd_wq_disable_cleanup() inside idxd_wq_device_reset_cleanup()
> since only the unchangeable parts need to be cleared.

Applied, thanks

-- 
~Vinod

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-08 17:57 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-05 21:53 [PATCH] dmaengine: idxd: fix device cleanup on disable Dave Jiang
2022-04-08 17:57 ` Vinod Koul

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.