]> www.infradead.org Git - users/jedix/linux-maple.git/commit
crypto: qat - preserve ADF_GENERAL_SEC
authorAdam Guerin <adam.guerin@intel.com>
Wed, 17 Jul 2024 11:44:56 +0000 (07:44 -0400)
committerHerbert Xu <herbert@gondor.apana.org.au>
Fri, 2 Aug 2024 13:11:20 +0000 (21:11 +0800)
commit4e190a5740aedc37654335089e7923bc8109dc3a
tree726a198712fa74df0d6d2a25b982ed8932c321eb
parent47d96252099a7184b4bad852fcfa3c233c1d2f71
crypto: qat - preserve ADF_GENERAL_SEC

The ADF_GENERAL_SEC configuration section contains values that must be
preserved during state transitions (down -> up, up -> down).
This patch modifies the logic in adf_dev_shutdown() to maintain all
key values within this section, rather than selectively saving and
restoring only the ADF_SERVICES_ENABLED attribute.

To achieve this, a new function has been introduced that deletes all
configuration sections except for the one specified by name.
This function is invoked during adf_dev_down(), with ADF_GENERAL_SEC
as the argument. Consequently, the adf_dev_shutdown_cache_cfg() function
has been removed as it is now redundant.

Additionally, this patch eliminates the cache_config parameter from
the adf_dev_down() function since ADF_GENERAL_SEC should always be
retained. This change does not cause any side effects because all
entries in the key-value store are cleared when a module is unloaded.

Signed-off-by: Adam Guerin <adam.guerin@intel.com>
Co-developed-by: Michal Witwicki <michal.witwicki@intel.com>
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>
17 files changed:
drivers/crypto/intel/qat/qat_420xx/adf_drv.c
drivers/crypto/intel/qat/qat_4xxx/adf_drv.c
drivers/crypto/intel/qat/qat_c3xxx/adf_drv.c
drivers/crypto/intel/qat/qat_c3xxxvf/adf_drv.c
drivers/crypto/intel/qat/qat_c62x/adf_drv.c
drivers/crypto/intel/qat/qat_c62xvf/adf_drv.c
drivers/crypto/intel/qat/qat_common/adf_aer.c
drivers/crypto/intel/qat/qat_common/adf_cfg.c
drivers/crypto/intel/qat/qat_common/adf_cfg.h
drivers/crypto/intel/qat/qat_common/adf_common_drv.h
drivers/crypto/intel/qat/qat_common/adf_ctl_drv.c
drivers/crypto/intel/qat/qat_common/adf_init.c
drivers/crypto/intel/qat/qat_common/adf_sriov.c
drivers/crypto/intel/qat/qat_common/adf_sysfs.c
drivers/crypto/intel/qat/qat_common/adf_vf_isr.c
drivers/crypto/intel/qat/qat_dh895xcc/adf_drv.c
drivers/crypto/intel/qat/qat_dh895xccvf/adf_drv.c