crypto: qat - add sysfs PCI reset support for QAT devices
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest6 patches 1 replyIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | crypto: qat - keep VFs enabled during resetdrivers/ | +11 | 0 replies | |
| 2/6 | crypto: qat - notify fatal error before AER reset preparationdrivers/ | +2 | 0 replies | |
| 3/6 | crypto: qat - centralize bus master enabledrivers/ drivers/ drivers/ +9 more | +10 | 0 replies | |
| 4/6 | crypto: qat - skip restart for down devicesdrivers/ | +8 | 0 replies | |
| 5/6 | crypto: qat - factor out AER reset helpersdrivers/ | +53 | 0 replies | |
| 6/6 | crypto: qat - handle sysfs-triggered reset callbacksdrivers/ | +12 | 0 replies |
Reviews trailers per patch
All 6 patches have a Reviewed-by or Acked-by.
| Patch | Giovanni Cabiddu | Damian Muszynski | Andy Shevchenko |
|---|---|---|---|
| 1/6 | R-b | R-b | |
| 2/6 | R-b | R-b | |
| 3/6 | R-b | R-b | |
| 4/6 | R-b | ||
| 5/6 | R-b | R-b | |
| 6/6 | R-b | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.
Cover letter [PATCH 0/6] crypto: qat - add sysfs PCI reset support for QAT devices
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
Signature · 13 lines
2.45.0 -------------------------------------------------------------- Intel Research and Development Ireland Limited Registered in Ireland Registered Office: Collinstown Industrial Park, Leixlip, County Kildare Registered Number: 308263 This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.