mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-25 00:52:45 -04:00
crypto: qat - extend configuration for 4xxx
A QAT GEN4 device can be currently configured for crypto (sym;asym) or compression (dc). This patch extends the configuration to support more variations of these services, download the correct FW images on the device and report the correct capabilities on the device based on the configured service. The device can now be configured with the following services: "sym", "asym", "dc", "sym;asym", "asym;sym", "sym;dc", "dc;sym", "asym;dc", "dc;asym". With this change, the configuration "sym", "asym", "sym;dc", "dc;sym", "asym;dc", "dc;asym" will be accessible only via userspace, i.e. the driver for those configurations will not register into the crypto framework. Support for such configurations in kernel will be enabled in a later patch. The pairs "sym;asym" and "asym;sym" result in identical device config. As do "sym;dc", "dc;sym", and "asym;dc", "dc;asym". Signed-off-by: Adam Guerin <adam.guerin@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
@@ -25,6 +25,13 @@
|
||||
#define ADF_DC "Dc"
|
||||
#define ADF_CFG_DC "dc"
|
||||
#define ADF_CFG_CY "sym;asym"
|
||||
#define ADF_CFG_SYM "sym"
|
||||
#define ADF_CFG_ASYM "asym"
|
||||
#define ADF_CFG_ASYM_SYM "asym;sym"
|
||||
#define ADF_CFG_ASYM_DC "asym;dc"
|
||||
#define ADF_CFG_DC_ASYM "dc;asym"
|
||||
#define ADF_CFG_SYM_DC "sym;dc"
|
||||
#define ADF_CFG_DC_SYM "dc;sym"
|
||||
#define ADF_SERVICES_ENABLED "ServicesEnabled"
|
||||
#define ADF_ETRMGR_COALESCING_ENABLED "InterruptCoalescingEnabled"
|
||||
#define ADF_ETRMGR_COALESCING_ENABLED_FORMAT \
|
||||
|
||||
@@ -78,6 +78,13 @@ static ssize_t state_store(struct device *dev, struct device_attribute *attr,
|
||||
static const char * const services_operations[] = {
|
||||
ADF_CFG_CY,
|
||||
ADF_CFG_DC,
|
||||
ADF_CFG_SYM,
|
||||
ADF_CFG_ASYM,
|
||||
ADF_CFG_ASYM_SYM,
|
||||
ADF_CFG_ASYM_DC,
|
||||
ADF_CFG_DC_ASYM,
|
||||
ADF_CFG_SYM_DC,
|
||||
ADF_CFG_DC_SYM,
|
||||
};
|
||||
|
||||
static ssize_t cfg_services_show(struct device *dev, struct device_attribute *attr,
|
||||
|
||||
Reference in New Issue
Block a user