linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] crypto: qat - fix CTX_ENABLES bits shift direction issue
@ 2015-12-16  2:39 Yang Pingchao
  2015-12-16  8:09 ` walter harms
  2015-12-22 13:22 ` Herbert Xu
  0 siblings, 2 replies; 6+ messages in thread
From: Yang Pingchao @ 2015-12-16  2:39 UTC (permalink / raw)
  To: herbert
  Cc: dan.carpenter, tadeusz.struk, linux-crypto, qat-linux,
	kernel-janitors, Yang Pingchao

AE CTX bits should be 8-15 in CTX_ENABLES, so the mask
value 0xff should be left shifted 0x8.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Yang Pingchao <pingchao.yang@intel.com>
---
 drivers/crypto/qat/qat_common/qat_hal.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/crypto/qat/qat_common/qat_hal.c b/drivers/crypto/qat/qat_common/qat_hal.c
index 45c1739..81bd1fe 100644
--- a/drivers/crypto/qat/qat_common/qat_hal.c
+++ b/drivers/crypto/qat/qat_common/qat_hal.c
@@ -418,7 +418,7 @@ int qat_hal_check_ae_active(struct icp_qat_fw_loader_handle *handle,
 
 	qat_hal_rd_ae_csr(handle, ae, CTX_ENABLES, &enable);
 	qat_hal_rd_ae_csr(handle, ae, ACTIVE_CTX_STATUS, &active);
-	if ((enable & (0xff >> CE_ENABLE_BITPOS)) ||
+	if ((enable & (0xff << CE_ENABLE_BITPOS)) ||
 	    (active & (1 << ACS_ABO_BITPOS)))
 		return 1;
 	else
-- 
2.6.4


^ permalink raw reply related	[flat|nested] 6+ messages in thread
[parent not found: <1449812574-35124-1-git-send-email-pingchao.yang@intel.com>]

end of thread, other threads:[~2015-12-22 13:22 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-12-16  2:39 [PATCH] crypto: qat - fix CTX_ENABLES bits shift direction issue Yang Pingchao
2015-12-16  8:09 ` walter harms
2015-12-16  8:22   ` Yang, Pingchao
2015-12-22 13:22 ` Herbert Xu
     [not found] <1449812574-35124-1-git-send-email-pingchao.yang@intel.com>
2015-12-11 15:22 ` Tadeusz Struk
2015-12-12  5:46   ` Herbert Xu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).