Skip to content

Commit

Permalink
crypto: qat - fix definition of ring reset results
Browse files Browse the repository at this point in the history
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: 0bba03c ("crypto: qat - add PFVF support to enable the reset of ring pairs")
Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Reported-by: Adam Guerin <adam.guerin@intel.com>
Reviewed-by: Marco Chiappero <marco.chiappero@intel.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
  • Loading branch information
Giovanni Cabiddu authored and Herbert Xu committed Dec 31, 2021
1 parent c5d692a commit 4cab5df
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/crypto/qat/qat_common/adf_pfvf_msg.h
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 4cab5df

Please sign in to comment.