aboutsummaryrefslogtreecommitdiff
path: root/drivers/crypto/intel/qat/qat_dh895xccvf/adf_drv.c
AgeCommit message (Collapse)AuthorFilesLines
2024-08-02crypto: qat - preserve ADF_GENERAL_SECAdam Guerin1-2/+2
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 <[email protected]> Co-developed-by: Michal Witwicki <[email protected]> Signed-off-by: Michal Witwicki <[email protected]> Reviewed-by: Giovanni Cabiddu <[email protected]> Reviewed-by: Przemek Kitszel <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2023-10-13crypto: qat - add namespace to driverGiovanni Cabiddu1-0/+1
Create CRYPTO_QAT namespace for symbols exported by the qat_common module and import those in the QAT drivers. It will reduce the global namespace crowdedness and potential misuse or the API. This does not introduce any functional change. Suggested-by: Andy Shevchenko <[email protected]> Signed-off-by: Giovanni Cabiddu <[email protected]> Reviewed-by: Lucas Segarra Fernandez <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2023-06-02crypto: qat - move dbgfs init to separate fileDamian Muszynski1-8/+4
Move initialization of debugfs entries to a separate file. This simplifies the exclusion of the debugfs logic in the QAT driver when the kernel is built with CONFIG_DEBUG_FS=n. In addition, it will allow to consolidate the addition of debugfs entries to a single location in the code. This implementation adds infrastructure to create (and remove) debugfs entries at two different stages. The first, done when a device is probed, allows to keep debugfs entries persistent between a transition in device state (up to down or vice versa). The second, done after the initialization phase, allows to have debugfs entries that are accessible only when the device is up. In addition, move the creation of debugfs entries for configuration to the newly created function adf_dbgfs_init() and replace symbolic permissions with octal permissions when creating the debugfs files. This is to resolve the following warning reported by checkpatch: WARNING: Symbolic permissions 'S_IRUSR' are not preferred. Consider using octal permissions '0400'. Signed-off-by: Damian Muszynski <[email protected]> Reviewed-by: Giovanni Cabiddu <[email protected]> Signed-off-by: Giovanni Cabiddu <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
2023-04-06crypto: qat - Move driver to drivers/crypto/intel/qatTom Zanussi1-0/+232
With the growing number of Intel crypto drivers, it makes sense to group them all into a single drivers/crypto/intel/ directory. Signed-off-by: Tom Zanussi <[email protected]> Signed-off-by: Herbert Xu <[email protected]>