[13/17] crypto/cnxk: set device ops to null in PCI remove
Checks
Commit Message
Setting dev_ops to NULL in pci_remove to avoid
device close after removal.
Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
---
drivers/crypto/cnxk/cn10k_cryptodev.c | 1 +
drivers/crypto/cnxk/cn9k_cryptodev.c | 1 +
2 files changed, 2 insertions(+)
@@ -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)
@@ -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)