From: Harsh Jain <harsh@chelsio.com>
To: herbert@gondor.apana.org.au, linux-crypto@vger.kernel.org,
atul.gupta@chelsio.com, indranil@chelsio.com
Cc: Harsh Jain <harsh@chelsio.com>
Subject: [PATCH 5/6] crypto:chelsio: Reset counters on cxgb4 Detach
Date: Tue, 11 Dec 2018 16:21:41 +0530 [thread overview]
Message-ID: <beb0c0ec53425b33d19b48464453bd1872707bc4.1544520025.git.harsh@chelsio.com> (raw)
In-Reply-To: <cover.1544520025.git.harsh@chelsio.com>
In-Reply-To: <cover.1544520025.git.harsh@chelsio.com>
Reset the counters on receiving detach from Cxgb4.
Signed-off-by: Atul Gupta <atul.gupta@chelsio.com>
---
drivers/crypto/chelsio/chcr_core.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/drivers/crypto/chelsio/chcr_core.c b/drivers/crypto/chelsio/chcr_core.c
index f71a979..e04b3e8 100644
--- a/drivers/crypto/chelsio/chcr_core.c
+++ b/drivers/crypto/chelsio/chcr_core.c
@@ -132,6 +132,8 @@ static void chcr_dev_init(struct uld_ctx *u_ctx)
static int chcr_dev_move(struct uld_ctx *u_ctx)
{
+ struct adapter *adap;
+
mutex_lock(&drv_data.drv_mutex);
if (drv_data.last_dev == u_ctx) {
if (list_is_last(&drv_data.last_dev->entry, &drv_data.act_dev))
@@ -144,6 +146,8 @@ static int chcr_dev_move(struct uld_ctx *u_ctx)
list_move(&u_ctx->entry, &drv_data.inact_dev);
if (list_empty(&drv_data.act_dev))
drv_data.last_dev = NULL;
+ adap = padap(&u_ctx->dev);
+ memset(&adap->chcr_stats, 0, sizeof(adap->chcr_stats));
atomic_dec(&drv_data.dev_count);
mutex_unlock(&drv_data.drv_mutex);
--
2.1.4
next prev parent reply other threads:[~2018-12-11 10:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 10:51 [PATCH 0/6] crypto:chelsio: Bug Fixes Harsh Jain
2018-12-11 10:51 ` [PATCH 1/6] crypto:chelsio: Swap location of AAD and IV sent in WR Harsh Jain
2018-12-11 10:51 ` [PATCH 2/6] crypto:chelsio:Use same value for both channel in single WR Harsh Jain
2018-12-11 10:51 ` [PATCH 3/6] crypto:chelsio: cleanup:send addr as value in function argument Harsh Jain
2018-12-11 10:51 ` [PATCH 4/6] Crypto:Chelsio:Handle PCI shutdown event Harsh Jain
2018-12-11 10:51 ` Harsh Jain [this message]
2018-12-11 10:51 ` [PATCH 6/6] crypto:chelsio: Fix wrong error counter increments Harsh Jain
2018-12-23 4:01 ` [PATCH 0/6] crypto:chelsio: Bug 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=beb0c0ec53425b33d19b48464453bd1872707bc4.1544520025.git.harsh@chelsio.com \
--to=harsh@chelsio.com \
--cc=atul.gupta@chelsio.com \
--cc=herbert@gondor.apana.org.au \
--cc=indranil@chelsio.com \
--cc=linux-crypto@vger.kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.