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

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")
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>

authored by

Giovanni Cabiddu and committed by
Herbert Xu
4cab5dfd c5d692a2

+4 -4
+4 -4
drivers/crypto/qat/qat_common/adf_pfvf_msg.h
··· 139 139 }; 140 140 141 141 enum ring_reset_result { 142 - RPRESET_SUCCESS = 0x01, 143 - RPRESET_NOT_SUPPORTED = 0x02, 144 - RPRESET_INVAL_BANK = 0x03, 145 - RPRESET_TIMEOUT = 0x04, 142 + RPRESET_SUCCESS = 0x00, 143 + RPRESET_NOT_SUPPORTED = 0x01, 144 + RPRESET_INVAL_BANK = 0x02, 145 + RPRESET_TIMEOUT = 0x03, 146 146 }; 147 147 148 148 #define ADF_VF2PF_RNG_RESET_RP_MASK GENMASK(1, 0)