Linux cryptographic layer development
 help / color / mirror / Atom feed
From: Herbert Xu <herbert@gondor.apana.org.au>
To: Ahsan Atta <ahsan.atta@intel.com>
Cc: linux-crypto@vger.kernel.org, qat-linux@intel.com
Subject: Re: [PATCH 0/6] crypto: qat - add sysfs PCI reset support for QAT devices
Date: Fri, 22 May 2026 20:30:02 +0800	[thread overview]
Message-ID: <ahBMSqU--A975Oxu@gondor.apana.org.au> (raw)
In-Reply-To: <cover.1778685152.git.ahsan.atta@intel.com>

On Wed, May 13, 2026 at 05:16:53PM +0200, Ahsan Atta wrote:
> A PCI reset triggered through sysfs (/sys/bus/pci/devices/.../reset)
> leaves QAT devices in an unusable state because the driver has never
> implemented the reset_prepare() and reset_done() callbacks. The reset
> proceeds without quiescing the device or restoring it afterward. This
> series adds the missing sysfs reset support and fixes the deadlocks,
> state-management issues, and corner cases that surface when the reset
> path is actually exercised.
> 
> Note on stable backport:
> Since this support was entirely absent rather than broken by a specific
> commit, there is no individual Fixes tag that can be cited. We believe
> this series warrants inclusion in stable to allow users to perform
> standard PCI resets on QAT devices without rendering them
> non-functional. We will need to revisit/retest when doing the backport
> as the PCI core may have changed.
> 
> In summary:
> Patch #1: Skip VF disable and enable during device restart when the VF
> topology is already present. This avoids lock-order issues in PCI
> reset callbacks while keeping VF quiesce notification intact.
> 
> Patch #2: Move fatal error notification earlier in the AER path. This
> ensures subsystems and VFs are informed as soon as fatal error handling
> begins.
> 
> Patch #3: Centralize PCI bus-master enable into a single init path.
> Remove scattered pci_set_master()/pci_clear_master() calls so BME
> state is deterministic across reset flows.
> 
> Patch #4: Skip the shutdown and restart flow for devices that were
> already administratively down before PCI reset. PCI state is still
> restored, but the device remains down as expected.
> 
> Patch #5: Factor the common AER shutdown and recovery sequences into
> reset_prepare() and reset_done() helpers to simplify the reset path
> and prepare it for reuse.
> 
> Patch #6: Hook reset_prepare() and reset_done() into the QAT PCI error
> handler. This makes sysfs-triggered PCI reset follow the same quiesce
> and recovery flow as AER reset.
> 
> Ahsan Atta (6):
>   crypto: qat - keep VFs enabled during reset
>   crypto: qat - notify fatal error before AER reset preparation
>   crypto: qat - centralize bus master enable
>   crypto: qat - skip restart for down devices
>   crypto: qat - factor out AER reset helpers
>   crypto: qat - handle sysfs-triggered reset callbacks
> 
>  drivers/crypto/intel/qat/qat_420xx/adf_drv.c  |   2 -
>  drivers/crypto/intel/qat/qat_4xxx/adf_drv.c   |   2 -
>  drivers/crypto/intel/qat/qat_6xxx/adf_drv.c   |   2 -
>  drivers/crypto/intel/qat/qat_c3xxx/adf_drv.c  |   1 -
>  .../crypto/intel/qat/qat_c3xxxvf/adf_drv.c    |   1 -
>  drivers/crypto/intel/qat/qat_c62x/adf_drv.c   |   1 -
>  drivers/crypto/intel/qat/qat_c62xvf/adf_drv.c |   1 -
>  drivers/crypto/intel/qat/qat_common/adf_aer.c | 102 +++++++++++++-----
>  .../intel/qat/qat_common/adf_common_drv.h     |   1 +
>  .../crypto/intel/qat/qat_common/adf_init.c    |   2 +
>  .../crypto/intel/qat/qat_common/adf_sriov.c   |  12 ++-
>  .../crypto/intel/qat/qat_dh895xcc/adf_drv.c   |   1 -
>  .../crypto/intel/qat/qat_dh895xccvf/adf_drv.c |   1 -
>  13 files changed, 87 insertions(+), 42 deletions(-)
> 
> 
> base-commit: 6a69430dcc874c47fe5a25b70d87861c1cc9c0d8
> -- 
> 2.45.0

All applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

      parent reply	other threads:[~2026-05-22 12:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 15:16 [PATCH 0/6] crypto: qat - add sysfs PCI reset support for QAT devices Ahsan Atta
2026-05-13 15:16 ` [PATCH 1/6] crypto: qat - keep VFs enabled during reset Ahsan Atta
2026-05-13 15:16 ` [PATCH 2/6] crypto: qat - notify fatal error before AER reset preparation Ahsan Atta
2026-05-13 15:16 ` [PATCH 3/6] crypto: qat - centralize bus master enable Ahsan Atta
2026-05-13 15:16 ` [PATCH 4/6] crypto: qat - skip restart for down devices Ahsan Atta
2026-05-13 15:16 ` [PATCH 5/6] crypto: qat - factor out AER reset helpers Ahsan Atta
2026-05-13 15:16 ` [PATCH 6/6] crypto: qat - handle sysfs-triggered reset callbacks Ahsan Atta
2026-05-22 12:30 ` Herbert Xu [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ahBMSqU--A975Oxu@gondor.apana.org.au \
    --to=herbert@gondor.apana.org.au \
    --cc=ahsan.atta@intel.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=qat-linux@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox