Skip to contentSkip to conversation

chcr: un-register crypto algorithms

PATCH In review Devulapally Shiva Krishna 2 participants 2 messages Feb 19, 2020 – Feb 28, 2020

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 chcr: 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.

---
 drivers/crypto/chelsio/chcr_core.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/crypto/chelsio/chcr_core.c +2 -0
index 507ba20f0874..6e02254c007a 100644
@@ -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:
Signature · 1 line
2.18.1
maintainer
#1 lore raw
Quoted 8 lines · 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.

---
 drivers/crypto/chelsio/chcr_core.c | 2 ++
 1 file changed, 2 insertions(+)

Patch applied. Thanks.

Signature · 3 lines
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt