Loading
crypto: qat - re-enable sriov after pf reset
mainline inclusion from mainline-v6.9-rc1 commit 4469f9b2346834085fe4478ee1a851ee1de8ccb2 category: feature bugzilla: https://gitee.com/openeuler/intel-kernel/issues/I9A5BW CVE: N/A Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=4469f9b2346834085fe4478ee1a851ee1de8ccb2 ------------------------------------- When a Physical Function (PF) is reset, SR-IOV gets disabled, making the associated Virtual Functions (VFs) unavailable. Even after reset and using pci_restore_state, VFs remain uncreated because the numvfs still at 0. Therefore, it's necessary to reconfigure SR-IOV to re-enable VFs. This commit introduces the ADF_SRIOV_ENABLED configuration flag to cache the SR-IOV enablement state. SR-IOV is only re-enabled if it was previously configured. This commit also introduces a dedicated workqueue without `WQ_MEM_RECLAIM` flag for enabling SR-IOV during Heartbeat and CPM error resets, preventing workqueue flushing warning. This patch is based on earlier work done by Shashank Gupta. Intel-SIG: commit 4469f9b23468 crypto: qat - re-enable sriov after pf reset Backport to support QAT in-tree driver 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> [ Aichun Shi: amend commit log ] Signed-off-by:
Aichun Shi <aichun.shi@intel.com>