Skip to contentSkip to conversation

crypto: qat - fix definition of ring reset results

PATCH In review Giovanni Cabiddu 2 participants 2 messages Dec 24, 2021 – Dec 31, 2021 Crypto API

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 crypto: qat - fix definition of ring reset results

The ring reset result values are defined starting from 0x1 instead of 0. This causes out-of-tree drivers that support this message to understand that a ring reset failed even if the operation was successful.

Fix by starting the definition of ring reset result values from 0.

Fixes 0bba03ce9739 ("crypto: qat - add PFVF support to enable the reset of ring pairs")
---
 drivers/crypto/qat/qat_common/adf_pfvf_msg.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
drivers/crypto/qat/qat_common/adf_pfvf_msg.h +4 -4
index 86b0e7baa4d3..9c37a2661392 100644
@@ -139,10 +139,10 @@ enum pf2vf_compat_response {
 };
 
 enum ring_reset_result {
-	RPRESET_SUCCESS				= 0x01,
-	RPRESET_NOT_SUPPORTED			= 0x02,
-	RPRESET_INVAL_BANK			= 0x03,
-	RPRESET_TIMEOUT				= 0x04,
+	RPRESET_SUCCESS				= 0x00,
+	RPRESET_NOT_SUPPORTED			= 0x01,
+	RPRESET_INVAL_BANK			= 0x02,
+	RPRESET_TIMEOUT				= 0x03,
 };
 
 #define ADF_VF2PF_RNG_RESET_RP_MASK		GENMASK(1, 0)
Signature · 1 line
2.33.1
maintainer
#1 lore raw
Quoted 6 lines · Giovanni Cabiddu

The ring reset result values are defined starting from 0x1 instead of 0. This causes out-of-tree drivers that support this message to understand that a ring reset failed even if the operation was successful.

Fix by starting the definition of ring reset result values from 0.

Quoted 7 lines
Fixes 0bba03ce9739 ("crypto: qat - add PFVF support to enable the reset of ring pairs")
---
 drivers/crypto/qat/qat_common/adf_pfvf_msg.h | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt