diff options
author | Michal Witwicki <michal.witwicki@intel.com> | 2024-07-17 07:45:00 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2024-08-02 21:11:20 +0800 |
commit | ca88a2bdd4dd371e9f248d12528b1daf10db8648 (patch) | |
tree | 2ff0fc8f2c1d508fbc98444f85efbb2d321fe39e /lib/crypto/mpi/mpi-add.c | |
parent | cd8d2d74292c199b433ef77762bb1d28a4821784 (diff) | |
download | linux-ca88a2bdd4dd371e9f248d12528b1daf10db8648.tar.gz linux-ca88a2bdd4dd371e9f248d12528b1daf10db8648.tar.bz2 linux-ca88a2bdd4dd371e9f248d12528b1daf10db8648.zip |
crypto: qat - allow disabling SR-IOV VFs
The QAT driver allows enabling SR-IOV VFs but does not allow them to be
disabled through a write to sysfs.
Disabling SR-IOV VFs can be only achieved by bringing down and up a
device using the attribute /sys/bus/pci/devices/<BDF>/qat/state.
The documentation for the sysfs attribute `sriov_numvfs` specifies
that "a userspace application wanting to disable the VFs would write a
zero to this file".
Add support for disabling SR-IOV VFs by writing '0' to the
'sriov_numvfs' attribute in sysfs.
Enabling or disabling SR-IOV always requires adf_dev_down() to be
called. This action subsequently leads to the deletion of the
ADF_KERNEL_SEC configuration section. The keys ADF_NUM_CY and ADF_NUM_DC
within that section must be set to '0', otherwise, the driver will
register into the Linux Crypto Framework. Because of this, the
configuration in the ADF_KERNEL_SEC section must be added before every
sriov_enable.
Signed-off-by: Michal Witwicki <michal.witwicki@intel.com>
Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'lib/crypto/mpi/mpi-add.c')
0 files changed, 0 insertions, 0 deletions