linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yang Pingchao <pingchao.yang@intel.com>
To: herbert@gondor.apana.org.au
Cc: dan.carpenter@oracle.com, tadeusz.struk@intel.com,
	linux-crypto@vger.kernel.org, qat-linux@intel.com,
	kernel-janitors@vger.kernel.org,
	Yang Pingchao <pingchao.yang@intel.com>
Subject: [PATCH] crypto: qat - fix CTX_ENABLES bits shift direction issue
Date: Wed, 16 Dec 2015 10:39:40 +0800	[thread overview]
Message-ID: <1450233580-58266-1-git-send-email-pingchao.yang@intel.com> (raw)

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


             reply	other threads:[~2015-12-16  2:39 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-16  2:39 Yang Pingchao [this message]
2015-12-16  8:09 ` [PATCH] crypto: qat - fix CTX_ENABLES bits shift direction issue 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1450233580-58266-1-git-send-email-pingchao.yang@intel.com \
    --to=pingchao.yang@intel.com \
    --cc=dan.carpenter@oracle.com \
    --cc=herbert@gondor.apana.org.au \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-crypto@vger.kernel.org \
    --cc=qat-linux@intel.com \
    --cc=tadeusz.struk@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).