[PATCH 13/17] crypto/cnxk: set device ops to null in PCI remove
Tejasree Kondoj
ktejasree at marvell.com
Tue Dec 20 15:32:28 CET 2022
Setting dev_ops to NULL in pci_remove to avoid
device close after removal.
Signed-off-by: Tejasree Kondoj <ktejasree at marvell.com>
---
drivers/crypto/cnxk/cn10k_cryptodev.c | 1 +
drivers/crypto/cnxk/cn9k_cryptodev.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/drivers/crypto/cnxk/cn10k_cryptodev.c b/drivers/crypto/cnxk/cn10k_cryptodev.c
index 52de9b9657..2fd4df3c5d 100644
--- a/drivers/crypto/cnxk/cn10k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn10k_cryptodev.c
@@ -138,6 +138,7 @@ cn10k_cpt_pci_remove(struct rte_pci_device *pci_dev)
cnxk_crypto_sec_ctx_destroy(dev);
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ dev->dev_ops = NULL;
vf = dev->data->dev_private;
ret = roc_cpt_dev_fini(&vf->cpt);
if (ret)
diff --git a/drivers/crypto/cnxk/cn9k_cryptodev.c b/drivers/crypto/cnxk/cn9k_cryptodev.c
index 4cfc1f2150..47b0874185 100644
--- a/drivers/crypto/cnxk/cn9k_cryptodev.c
+++ b/drivers/crypto/cnxk/cn9k_cryptodev.c
@@ -138,6 +138,7 @@ cn9k_cpt_pci_remove(struct rte_pci_device *pci_dev)
cnxk_crypto_sec_ctx_destroy(dev);
if (rte_eal_process_type() == RTE_PROC_PRIMARY) {
+ dev->dev_ops = NULL;
vf = dev->data->dev_private;
ret = roc_cpt_dev_fini(&vf->cpt);
if (ret)
--
2.25.1
More information about the dev
mailing list