linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH Crypto] chcr: un-register crypto algorithms
@ 2020-02-19 13:13 Devulapally Shiva Krishna
  2020-02-28  0:51 ` Herbert Xu
  0 siblings, 1 reply; 2+ messages in thread
From: Devulapally Shiva Krishna @ 2020-02-19 13:13 UTC (permalink / raw)
  To: herbert, linux-crypto
  Cc: manojmalviya, ayush.sawal, Devulapally Shiva Krishna

When a PCI device will be removed, cxgb4(LLD) will notify chcr(ULD).
Incase if it's a last pci device, chcr should un-register all the crypto
algorithms.

Signed-off-by: Devulapally Shiva Krishna <shiva@chelsio.com>
---
 drivers/crypto/chelsio/chcr_core.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/crypto/chelsio/chcr_core.c b/drivers/crypto/chelsio/chcr_core.c
index 507ba20f0874..6e02254c007a 100644
--- a/drivers/crypto/chelsio/chcr_core.c
+++ b/drivers/crypto/chelsio/chcr_core.c
@@ -271,6 +271,8 @@ static int chcr_uld_state_change(void *handle, enum cxgb4_state state)
 
 	case CXGB4_STATE_DETACH:
 		chcr_detach_device(u_ctx);
+		if (!atomic_read(&drv_data.dev_count))
+			stop_crypto();
 		break;
 
 	case CXGB4_STATE_START_RECOVERY:
-- 
2.18.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH Crypto] chcr: un-register crypto algorithms
  2020-02-19 13:13 [PATCH Crypto] chcr: un-register crypto algorithms Devulapally Shiva Krishna
@ 2020-02-28  0:51 ` Herbert Xu
  0 siblings, 0 replies; 2+ messages in thread
From: Herbert Xu @ 2020-02-28  0:51 UTC (permalink / raw)
  To: Devulapally Shiva Krishna; +Cc: linux-crypto, manojmalviya, ayush.sawal

On Wed, Feb 19, 2020 at 06:43:57PM +0530, Devulapally Shiva Krishna wrote:
> When a PCI device will be removed, cxgb4(LLD) will notify chcr(ULD).
> Incase if it's a last pci device, chcr should un-register all the crypto
> algorithms.
> 
> Signed-off-by: Devulapally Shiva Krishna <shiva@chelsio.com>
> ---
>  drivers/crypto/chelsio/chcr_core.c | 2 ++
>  1 file changed, 2 insertions(+)

Patch applied.  Thanks.
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2020-02-28  0:51 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-19 13:13 [PATCH Crypto] chcr: un-register crypto algorithms Devulapally Shiva Krishna
2020-02-28  0:51 ` 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).