Skip to content

Commit 6ff78ff

Browse files
Devulapally Shiva Krishnaherbertx
authored andcommitted
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>
1 parent f747426 commit 6ff78ff

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎drivers/crypto/chelsio/chcr_core.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,8 @@ static int chcr_uld_state_change(void *handle, enum cxgb4_state state)
271271

272272
case CXGB4_STATE_DETACH:
273273
chcr_detach_device(u_ctx);
274+
if (!atomic_read(&drv_data.dev_count))
275+
stop_crypto();
274276
break;
275277

276278
case CXGB4_STATE_START_RECOVERY:

0 commit comments

Comments
 (0)