diff options
author | Devulapally Shiva Krishna <shiva@chelsio.com> | 2020-02-19 16:13:57 +0300 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2020-02-28 03:36:46 +0300 |
commit | 6ff78ffaddd807cd458ec3fdcc714d3a79414e5e (patch) | |
tree | 0671704351bde277ad2609d3d2a14be2d9580db4 | |
parent | f747426d6b3516b228a7e2e0354cb5e3c55ba8e5 (diff) | |
download | linux-6ff78ffaddd807cd458ec3fdcc714d3a79414e5e.tar.xz |
crypto: chelsio - un-register crypto algorithms
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>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
-rw-r--r-- | drivers/crypto/chelsio/chcr_core.c | 2 |
1 files changed, 2 insertions, 0 deletions
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: |