diff options
author | Mun Chun Yep <mun.chun.yep@intel.com> | 2024-02-02 18:53:19 +0800 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-02-09 12:57:18 +0800 |
commit | ec26f8e6c784ae391e69b19f4738d7196ed7794d (patch) | |
tree | 6775f0e9a2b3ce813cb6ae3d72b306d703911fc8 /drivers/crypto/intel/qat/qat_common/adf_sriov.c | |
parent | 758a0087db98fa23a3597289dbf3643ba9db2700 (diff) | |
download | lwn-ec26f8e6c784ae391e69b19f4738d7196ed7794d.tar.gz lwn-ec26f8e6c784ae391e69b19f4738d7196ed7794d.zip |
crypto: qat - update PFVF protocol for recovery
Update the PFVF logic to handle restart and recovery. This adds the
following functions:
* adf_pf2vf_notify_fatal_error(): allows the PF to notify VFs that the
device detected a fatal error and requires a reset. This sends to
VF the event `ADF_PF2VF_MSGTYPE_FATAL_ERROR`.
* adf_pf2vf_wait_for_restarting_complete(): allows the PF to wait for
`ADF_VF2PF_MSGTYPE_RESTARTING_COMPLETE` events from active VFs
before proceeding with a reset.
* adf_pf2vf_notify_restarted(): enables the PF to notify VFs with
an `ADF_PF2VF_MSGTYPE_RESTARTED` event after recovery, indicating that
the device is back to normal. This prompts VF drivers switch back to
use the accelerator for workload processing.
These changes improve the communication and synchronization between PF
and VF drivers during system restart and recovery processes.
Signed-off-by: Mun Chun Yep <mun.chun.yep@intel.com>
Reviewed-by: Ahsan Atta <ahsan.atta@intel.com>
Reviewed-by: Markas Rapoportas <markas.rapoportas@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/crypto/intel/qat/qat_common/adf_sriov.c')
-rw-r--r-- | drivers/crypto/intel/qat/qat_common/adf_sriov.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/crypto/intel/qat/qat_common/adf_sriov.c b/drivers/crypto/intel/qat/qat_common/adf_sriov.c index f44025bb6f99..cb2a9830f192 100644 --- a/drivers/crypto/intel/qat/qat_common/adf_sriov.c +++ b/drivers/crypto/intel/qat/qat_common/adf_sriov.c @@ -103,6 +103,7 @@ void adf_disable_sriov(struct adf_accel_dev *accel_dev) return; adf_pf2vf_notify_restarting(accel_dev); + adf_pf2vf_wait_for_restarting_complete(accel_dev); pci_disable_sriov(accel_to_pci_dev(accel_dev)); /* Disable VF to PF interrupts */ |