git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
common/cnxk: support SSO IRQ
[dpdk.git]
/
drivers
/
common
/
cnxk
/
roc_dev.c
diff --git
a/drivers/common/cnxk/roc_dev.c
b/drivers/common/cnxk/roc_dev.c
index
4cd5978
..
a39acc9
100644
(file)
--- a/
drivers/common/cnxk/roc_dev.c
+++ b/
drivers/common/cnxk/roc_dev.c
@@
-1125,6
+1125,10
@@
dev_init(struct dev *dev, struct plt_pci_device *pci_dev)
}
dev->mbox_active = 1;
}
dev->mbox_active = 1;
+ rc = npa_lf_init(dev, pci_dev);
+ if (rc)
+ goto iounmap;
+
/* Setup LMT line base */
rc = dev_lmt_setup(pci_dev, dev);
if (rc)
/* Setup LMT line base */
rc = dev_lmt_setup(pci_dev, dev);
if (rc)
@@
-1150,6
+1154,13
@@
dev_fini(struct dev *dev, struct plt_pci_device *pci_dev)
struct plt_intr_handle *intr_handle = &pci_dev->intr_handle;
struct mbox *mbox;
struct plt_intr_handle *intr_handle = &pci_dev->intr_handle;
struct mbox *mbox;
+ /* Check if this dev hosts npalf and has 1+ refs */
+ if (idev_npa_lf_active(dev) > 1)
+ return -EAGAIN;
+
+ /* Clear references to this pci dev */
+ npa_lf_fini();
+
mbox_unregister_irq(pci_dev, dev);
if (!dev_is_vf(dev))
mbox_unregister_irq(pci_dev, dev);
if (!dev_is_vf(dev))