Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Marco Chiappero and committed by
Herbert Xu
1d4fde6c f6aff914

+22 -11
+22 -11
drivers/crypto/qat/qat_common/adf_pfvf_msg.h
··· 60 60 #define ADF_PF2VF_IN_USE_BY_PF_MASK 0xFFFE0000 61 61 #define ADF_PF2VF_MSGTYPE_MASK 0x0000003C 62 62 #define ADF_PF2VF_MSGTYPE_SHIFT 2 63 - #define ADF_PF2VF_MSGTYPE_RESTARTING 0x01 64 - #define ADF_PF2VF_MSGTYPE_VERSION_RESP 0x02 63 + 64 + enum pf2vf_msgtype { 65 + ADF_PF2VF_MSGTYPE_RESTARTING = 0x01, 66 + ADF_PF2VF_MSGTYPE_VERSION_RESP = 0x02, 67 + }; 65 68 66 69 /* VF->PF messages */ 67 70 #define ADF_VF2PF_INT BIT(16) ··· 73 70 #define ADF_VF2PF_IN_USE_BY_VF_MASK 0x0000FFFE 74 71 #define ADF_VF2PF_MSGTYPE_MASK 0x003C0000 75 72 #define ADF_VF2PF_MSGTYPE_SHIFT 18 76 - #define ADF_VF2PF_MSGTYPE_INIT 0x3 77 - #define ADF_VF2PF_MSGTYPE_SHUTDOWN 0x4 78 - #define ADF_VF2PF_MSGTYPE_VERSION_REQ 0x5 79 - #define ADF_VF2PF_MSGTYPE_COMPAT_VER_REQ 0x6 73 + 74 + enum vf2pf_msgtype { 75 + ADF_VF2PF_MSGTYPE_INIT = 0x03, 76 + ADF_VF2PF_MSGTYPE_SHUTDOWN = 0x04, 77 + ADF_VF2PF_MSGTYPE_VERSION_REQ = 0x05, 78 + ADF_VF2PF_MSGTYPE_COMPAT_VER_REQ = 0x06, 79 + }; 80 80 81 81 /* VF/PF compatibility version. */ 82 - /* Reference to the current version */ 83 - #define ADF_PFVF_COMPAT_THIS_VERSION 1 /* PF<->VF compat */ 82 + enum pfvf_compatibility_version { 83 + /* Reference to the current version */ 84 + ADF_PFVF_COMPAT_THIS_VERSION = 0x01, 85 + }; 84 86 85 87 /* PF->VF Version Response */ 86 88 #define ADF_PF2VF_MINORVERSION_SHIFT 6 ··· 94 86 #define ADF_PF2VF_VERSION_RESP_VERS_SHIFT 6 95 87 #define ADF_PF2VF_VERSION_RESP_RESULT_MASK 0x0000C000 96 88 #define ADF_PF2VF_VERSION_RESP_RESULT_SHIFT 14 97 - #define ADF_PF2VF_VF_COMPATIBLE 1 98 - #define ADF_PF2VF_VF_INCOMPATIBLE 2 99 - #define ADF_PF2VF_VF_COMPAT_UNKNOWN 3 89 + 90 + enum pf2vf_compat_response { 91 + ADF_PF2VF_VF_COMPATIBLE = 0x01, 92 + ADF_PF2VF_VF_INCOMPATIBLE = 0x02, 93 + ADF_PF2VF_VF_COMPAT_UNKNOWN = 0x03, 94 + }; 100 95 101 96 /* VF->PF Compatible Version Request */ 102 97 #define ADF_VF2PF_COMPAT_VER_REQ_SHIFT 22