mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Yang Shen <shenyang39@huawei.com>
To: <herbert@gondor.apana.org.au>, <davem@davemloft.net>
Cc: <linux-kernel@vger.kernel.org>, <linux-crypto@vger.kernel.org>,
	<xuzaibo@huawei.com>, <wangzhou1@hisilicon.com>
Subject: [PATCH v5 02/10] crypto: hisilicon/qm - clear used reference count when start qp
Date: Sat, 15 Aug 2020 17:56:09 +0800	[thread overview]
Message-ID: <1597485377-2678-3-git-send-email-shenyang39@huawei.com> (raw)
In-Reply-To: <1597485377-2678-1-git-send-email-shenyang39@huawei.com>

From: Shukun Tan <tanshukun1@huawei.com>

The used reference count is used for counting the number of 'sqe' which
is under processing. This reference count should be cleared as starting
'qp', otherwise the 'used' will be messy when allocating this 'qp' again.

Fixes: 5308f6600a39("crypto: hisilicon - QM memory management...")
Signed-off-by: Shukun Tan <tanshukun1@huawei.com>
Signed-off-by: Yang Shen <shenyang39@huawei.com>
Reviewed-by: Zhou Wang <wangzhou1@hisilicon.com>
---
 drivers/crypto/hisilicon/qm.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/crypto/hisilicon/qm.c b/drivers/crypto/hisilicon/qm.c
index fb389c0..1e49931 100644
--- a/drivers/crypto/hisilicon/qm.c
+++ b/drivers/crypto/hisilicon/qm.c
@@ -755,6 +755,7 @@ static void qm_init_qp_status(struct hisi_qp *qp)
 	qp_status->cq_head = 0;
 	qp_status->cqc_phase = true;
 	atomic_set(&qp_status->flags, 0);
+	atomic_set(&qp_status->used, 0);
 }
 
 static void qm_vft_data_cfg(struct hisi_qm *qm, enum vft_type type, u32 base,
-- 
2.7.4


  parent reply	other threads:[~2020-08-16  1:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-15  9:56 [PATCH v5 00/10] crypto: hisilicon/qm - misc fixes Yang Shen
2020-08-15  9:56 ` [PATCH v5 01/10] crypto: hisilicon/qm - fix wrong release after using strsep Yang Shen
2020-08-15  9:56 ` Yang Shen [this message]
2020-08-15  9:56 ` [PATCH v5 03/10] crypto: hisilicon/qm - fix print frequence in hisi_qp_send Yang Shen
2020-08-15  9:56 ` [PATCH v5 04/10] crypto: hisilicon/qm - fix judgement of queue is full Yang Shen
2020-08-15  9:56 ` [PATCH v5 05/10] crypto: hisilicon/qm - fix event queue depth to 2048 Yang Shen
2020-08-15  9:56 ` [PATCH v5 06/10] crypto: hisilicon/qm - fix no stop reason when use 'hisi_qm_stop' Yang Shen
2020-08-15  9:56 ` [PATCH v5 07/10] crypto: hisilicon/qm - fix VF not available after PF FLR Yang Shen
2020-08-15  9:56 ` [PATCH v5 08/10] crypto: hisilicon/qm - register callback function to 'pci_driver.shutdown' Yang Shen
2020-08-15  9:56 ` [PATCH v5 09/10] crypto: hisilicon/qm - fix the call trace when unbind device Yang Shen
2020-08-15  9:56 ` [PATCH v5 10/10] crypto: hisilicon/qm - fix the process of register algorithms to crypto Yang Shen
2020-08-21  8:01 ` [PATCH v5 00/10] crypto: hisilicon/qm - misc fixes 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=1597485377-2678-3-git-send-email-shenyang39@huawei.com \
    --to=shenyang39@huawei.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=wangzhou1@hisilicon.com \
    --cc=xuzaibo@huawei.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

all inboxes | Powered by JetHome®