mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-04 08:08:54 +00:00
crypto: qat - use enums for PFVF protocol codes
Replace PFVF constants with enumerations for valid protocol codes. Signed-off-by: Marco Chiappero <marco.chiappero@intel.com> Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
This commit is contained in:
parent
f6aff91498
commit
1d4fde6c4e
1 changed files with 22 additions and 11 deletions
|
@ -60,8 +60,11 @@
|
|||
#define ADF_PF2VF_IN_USE_BY_PF_MASK 0xFFFE0000
|
||||
#define ADF_PF2VF_MSGTYPE_MASK 0x0000003C
|
||||
#define ADF_PF2VF_MSGTYPE_SHIFT 2
|
||||
#define ADF_PF2VF_MSGTYPE_RESTARTING 0x01
|
||||
#define ADF_PF2VF_MSGTYPE_VERSION_RESP 0x02
|
||||
|
||||
enum pf2vf_msgtype {
|
||||
ADF_PF2VF_MSGTYPE_RESTARTING = 0x01,
|
||||
ADF_PF2VF_MSGTYPE_VERSION_RESP = 0x02,
|
||||
};
|
||||
|
||||
/* VF->PF messages */
|
||||
#define ADF_VF2PF_INT BIT(16)
|
||||
|
@ -70,14 +73,19 @@
|
|||
#define ADF_VF2PF_IN_USE_BY_VF_MASK 0x0000FFFE
|
||||
#define ADF_VF2PF_MSGTYPE_MASK 0x003C0000
|
||||
#define ADF_VF2PF_MSGTYPE_SHIFT 18
|
||||
#define ADF_VF2PF_MSGTYPE_INIT 0x3
|
||||
#define ADF_VF2PF_MSGTYPE_SHUTDOWN 0x4
|
||||
#define ADF_VF2PF_MSGTYPE_VERSION_REQ 0x5
|
||||
#define ADF_VF2PF_MSGTYPE_COMPAT_VER_REQ 0x6
|
||||
|
||||
enum vf2pf_msgtype {
|
||||
ADF_VF2PF_MSGTYPE_INIT = 0x03,
|
||||
ADF_VF2PF_MSGTYPE_SHUTDOWN = 0x04,
|
||||
ADF_VF2PF_MSGTYPE_VERSION_REQ = 0x05,
|
||||
ADF_VF2PF_MSGTYPE_COMPAT_VER_REQ = 0x06,
|
||||
};
|
||||
|
||||
/* VF/PF compatibility version. */
|
||||
/* Reference to the current version */
|
||||
#define ADF_PFVF_COMPAT_THIS_VERSION 1 /* PF<->VF compat */
|
||||
enum pfvf_compatibility_version {
|
||||
/* Reference to the current version */
|
||||
ADF_PFVF_COMPAT_THIS_VERSION = 0x01,
|
||||
};
|
||||
|
||||
/* PF->VF Version Response */
|
||||
#define ADF_PF2VF_MINORVERSION_SHIFT 6
|
||||
|
@ -86,9 +94,12 @@
|
|||
#define ADF_PF2VF_VERSION_RESP_VERS_SHIFT 6
|
||||
#define ADF_PF2VF_VERSION_RESP_RESULT_MASK 0x0000C000
|
||||
#define ADF_PF2VF_VERSION_RESP_RESULT_SHIFT 14
|
||||
#define ADF_PF2VF_VF_COMPATIBLE 1
|
||||
#define ADF_PF2VF_VF_INCOMPATIBLE 2
|
||||
#define ADF_PF2VF_VF_COMPAT_UNKNOWN 3
|
||||
|
||||
enum pf2vf_compat_response {
|
||||
ADF_PF2VF_VF_COMPATIBLE = 0x01,
|
||||
ADF_PF2VF_VF_INCOMPATIBLE = 0x02,
|
||||
ADF_PF2VF_VF_COMPAT_UNKNOWN = 0x03,
|
||||
};
|
||||
|
||||
/* VF->PF Compatible Version Request */
|
||||
#define ADF_VF2PF_COMPAT_VER_REQ_SHIFT 22
|
||||
|
|
Loading…
Reference in a new issue