[PATCH 0/2] dmaengine: idxd: Fix up re-enabling device workqueues

Jerry Snitselaar posted 2 patches 3 years, 6 months ago
There is a newer version of this series
drivers/dma/idxd/device.c | 4 +++-
drivers/dma/idxd/idxd.h   | 2 ++
drivers/dma/idxd/init.c   | 6 ++++++
drivers/dma/idxd/irq.c    | 4 ++--
drivers/dma/idxd/sysfs.c  | 1 +
5 files changed, 14 insertions(+), 3 deletions(-)
[PATCH 0/2] dmaengine: idxd: Fix up re-enabling device workqueues
Posted by Jerry Snitselaar 3 years, 6 months ago
Currently if a software reset is attempted on an idxd device
the workqueues will not be re-enabled, because it will see
incorrectly see that wq->state is already set to IDXD_WQ_ENABLED.
So set the workqueue state to disabled in idxd_wq_disable_cleanup(),
and use a bitmap to track which workqueues have been enabled so they
can be re-enabled during device re-initialization.

Cc: Fenghua Yu <fenghua.yu@intel.com>
Cc: Dave Jiang <dave.jiang@intel.com>
Cc: Vinod Koul <vkoul@kernel.org>

Jerry Snitselaar (2):
  dmaengine: idxd: Set wq state to disabled in idxd_wq_disable_cleanup()
  dmaengine: idxd: track enabled workqueues in bitmap

 drivers/dma/idxd/device.c | 4 +++-
 drivers/dma/idxd/idxd.h   | 2 ++
 drivers/dma/idxd/init.c   | 6 ++++++
 drivers/dma/idxd/irq.c    | 4 ++--
 drivers/dma/idxd/sysfs.c  | 1 +
 5 files changed, 14 insertions(+), 3 deletions(-)

-- 
2.37.2
Re: [PATCH 0/2] dmaengine: idxd: Fix up re-enabling device workqueues
Posted by Dave Jiang 3 years, 6 months ago
On 9/19/2022 2:55 PM, Jerry Snitselaar wrote:
> Currently if a software reset is attempted on an idxd device
> the workqueues will not be re-enabled, because it will see
> incorrectly see that wq->state is already set to IDXD_WQ_ENABLED.
> So set the workqueue state to disabled in idxd_wq_disable_cleanup(),
> and use a bitmap to track which workqueues have been enabled so they
> can be re-enabled during device re-initialization.
>
> Cc: Fenghua Yu <fenghua.yu@intel.com>
> Cc: Dave Jiang <dave.jiang@intel.com>
> Cc: Vinod Koul <vkoul@kernel.org>

For the series,

Reviewed-by: Dave Jiang <dave.jiang@intel.com>

Thank you Jerry!

> Jerry Snitselaar (2):
>    dmaengine: idxd: Set wq state to disabled in idxd_wq_disable_cleanup()
>    dmaengine: idxd: track enabled workqueues in bitmap
>
>   drivers/dma/idxd/device.c | 4 +++-
>   drivers/dma/idxd/idxd.h   | 2 ++
>   drivers/dma/idxd/init.c   | 6 ++++++
>   drivers/dma/idxd/irq.c    | 4 ++--
>   drivers/dma/idxd/sysfs.c  | 1 +
>   5 files changed, 14 insertions(+), 3 deletions(-)
>