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
eal: remove deprecated coherent IO memory barriers
[dpdk.git]
/
drivers
/
common
/
octeontx2
/
otx2_dev.c
diff --git
a/drivers/common/octeontx2/otx2_dev.c
b/drivers/common/octeontx2/otx2_dev.c
index
53a0c6e
..
d61c712
100644
(file)
--- a/
drivers/common/octeontx2/otx2_dev.c
+++ b/
drivers/common/octeontx2/otx2_dev.c
@@
-577,17
+577,16
@@
otx2_pf_vf_mbox_irq(void *param)
intr = otx2_read64(dev->bar2 + RVU_VF_INT);
if (intr == 0)
intr = otx2_read64(dev->bar2 + RVU_VF_INT);
if (intr == 0)
-
return
;
+
otx2_base_dbg("Proceeding to check mbox UP messages if any")
;
otx2_write64(intr, dev->bar2 + RVU_VF_INT);
otx2_base_dbg("Irq 0x%" PRIx64 "(pf:%d,vf:%d)", intr, dev->pf, dev->vf);
otx2_write64(intr, dev->bar2 + RVU_VF_INT);
otx2_base_dbg("Irq 0x%" PRIx64 "(pf:%d,vf:%d)", intr, dev->pf, dev->vf);
- if (intr) {
- /* First process all configuration messages */
- otx2_process_msgs(dev, dev->mbox);
- /* Process Uplink messages */
- otx2_process_msgs_up(dev, &dev->mbox_up);
- }
+ /* First process all configuration messages */
+ otx2_process_msgs(dev, dev->mbox);
+
+ /* Process Uplink messages */
+ otx2_process_msgs_up(dev, &dev->mbox_up);
}
static void
}
static void
@@
-598,18
+597,16
@@
otx2_af_pf_mbox_irq(void *param)
intr = otx2_read64(dev->bar2 + RVU_PF_INT);
if (intr == 0)
intr = otx2_read64(dev->bar2 + RVU_PF_INT);
if (intr == 0)
-
return
;
+
otx2_base_dbg("Proceeding to check mbox UP messages if any")
;
otx2_write64(intr, dev->bar2 + RVU_PF_INT);
otx2_write64(intr, dev->bar2 + RVU_PF_INT);
-
otx2_base_dbg("Irq 0x%" PRIx64 "(pf:%d,vf:%d)", intr, dev->pf, dev->vf);
otx2_base_dbg("Irq 0x%" PRIx64 "(pf:%d,vf:%d)", intr, dev->pf, dev->vf);
- if (intr) {
- /* First process all configuration messages */
- otx2_process_msgs(dev, dev->mbox);
- /* Process Uplink messages */
- otx2_process_msgs_up(dev, &dev->mbox_up);
- }
+ /* First process all configuration messages */
+ otx2_process_msgs(dev, dev->mbox);
+
+ /* Process Uplink messages */
+ otx2_process_msgs_up(dev, &dev->mbox_up);
}
static int
}
static int
@@
-744,9
+741,9
@@
static void
mbox_unregister_irq(struct rte_pci_device *pci_dev, struct otx2_dev *dev)
{
if (otx2_dev_is_vf(dev))
mbox_unregister_irq(struct rte_pci_device *pci_dev, struct otx2_dev *dev)
{
if (otx2_dev_is_vf(dev))
-
return
mbox_unregister_vf_irq(pci_dev, dev);
+ mbox_unregister_vf_irq(pci_dev, dev);
else
else
-
return
mbox_unregister_pf_irq(pci_dev, dev);
+ mbox_unregister_pf_irq(pci_dev, dev);
}
static int
}
static int
@@
-791,9
+788,8
@@
otx2_pf_vf_flr_irq(void *param)
if (!(intr & (1ULL << vf)))
continue;
if (!(intr & (1ULL << vf)))
continue;
- vf = 64 * i + vf;
otx2_base_dbg("FLR: i :%d intr: 0x%" PRIx64 ", vf-%d",
otx2_base_dbg("FLR: i :%d intr: 0x%" PRIx64 ", vf-%d",
- i, intr,
vf
);
+ i, intr,
(64 * i + vf)
);
/* Clear interrupt */
otx2_write64(BIT_ULL(vf), bar2 + RVU_PF_VFFLR_INTX(i));
/* Disable the interrupt */
/* Clear interrupt */
otx2_write64(BIT_ULL(vf), bar2 + RVU_PF_VFFLR_INTX(i));
/* Disable the interrupt */
@@
-875,20
+871,9
@@
otx2_dev_active_vfs(void *otx2_dev)
return count;
}
return count;
}
-static void
-otx2_update_pass_hwcap(struct rte_pci_device *pci_dev, struct otx2_dev *dev)
-{
- RTE_SET_USED(pci_dev);
-
- /* Update this logic when we have A1 */
- dev->hwcap |= OTX2_HWCAP_F_A0;
-}
-
static void
otx2_update_vf_hwcap(struct rte_pci_device *pci_dev, struct otx2_dev *dev)
{
static void
otx2_update_vf_hwcap(struct rte_pci_device *pci_dev, struct otx2_dev *dev)
{
- dev->hwcap = 0;
-
switch (pci_dev->id.device_id) {
case PCI_DEVID_OCTEONTX2_RVU_PF:
break;
switch (pci_dev->id.device_id) {
case PCI_DEVID_OCTEONTX2_RVU_PF:
break;
@@
-897,6
+882,7
@@
otx2_update_vf_hwcap(struct rte_pci_device *pci_dev, struct otx2_dev *dev)
case PCI_DEVID_OCTEONTX2_RVU_CPT_VF:
case PCI_DEVID_OCTEONTX2_RVU_AF_VF:
case PCI_DEVID_OCTEONTX2_RVU_VF:
case PCI_DEVID_OCTEONTX2_RVU_CPT_VF:
case PCI_DEVID_OCTEONTX2_RVU_AF_VF:
case PCI_DEVID_OCTEONTX2_RVU_VF:
+ case PCI_DEVID_OCTEONTX2_RVU_SDP_VF:
dev->hwcap |= OTX2_HWCAP_F_VF;
break;
}
dev->hwcap |= OTX2_HWCAP_F_VF;
break;
}
@@
-907,10
+893,11
@@
otx2_update_vf_hwcap(struct rte_pci_device *pci_dev, struct otx2_dev *dev)
* Initialize the otx2 device
*/
int
* Initialize the otx2 device
*/
int
-otx2_dev_init(struct rte_pci_device *pci_dev, void *otx2_dev)
+otx2_dev_
priv_
init(struct rte_pci_device *pci_dev, void *otx2_dev)
{
int up_direction = MBOX_DIR_PFAF_UP;
int rc, direction = MBOX_DIR_PFAF;
{
int up_direction = MBOX_DIR_PFAF_UP;
int rc, direction = MBOX_DIR_PFAF;
+ uint64_t intr_offset = RVU_PF_INT;
struct otx2_dev *dev = otx2_dev;
uintptr_t bar2, bar4;
uint64_t bar4_addr;
struct otx2_dev *dev = otx2_dev;
uintptr_t bar2, bar4;
uint64_t bar4_addr;
@@
-931,20
+918,22
@@
otx2_dev_init(struct rte_pci_device *pci_dev, void *otx2_dev)
dev->bar4 = bar4;
otx2_update_vf_hwcap(pci_dev, dev);
dev->bar4 = bar4;
otx2_update_vf_hwcap(pci_dev, dev);
- otx2_update_pass_hwcap(pci_dev, dev);
if (otx2_dev_is_vf(dev)) {
direction = MBOX_DIR_VFPF;
up_direction = MBOX_DIR_VFPF_UP;
if (otx2_dev_is_vf(dev)) {
direction = MBOX_DIR_VFPF;
up_direction = MBOX_DIR_VFPF_UP;
+ intr_offset = RVU_VF_INT;
}
/* Initialize the local mbox */
}
/* Initialize the local mbox */
- rc = otx2_mbox_init(&dev->mbox_local, bar4, bar2, direction, 1);
+ rc = otx2_mbox_init(&dev->mbox_local, bar4, bar2, direction, 1,
+ intr_offset);
if (rc)
goto error;
dev->mbox = &dev->mbox_local;
if (rc)
goto error;
dev->mbox = &dev->mbox_local;
- rc = otx2_mbox_init(&dev->mbox_up, bar4, bar2, up_direction, 1);
+ rc = otx2_mbox_init(&dev->mbox_up, bar4, bar2, up_direction, 1,
+ intr_offset);
if (rc)
goto error;
if (rc)
goto error;
@@
-979,13
+968,15
@@
otx2_dev_init(struct rte_pci_device *pci_dev, void *otx2_dev)
}
/* Init mbox object */
rc = otx2_mbox_init(&dev->mbox_vfpf, (uintptr_t)hwbase,
}
/* Init mbox object */
rc = otx2_mbox_init(&dev->mbox_vfpf, (uintptr_t)hwbase,
- bar2, MBOX_DIR_PFVF, pci_dev->max_vfs);
+ bar2, MBOX_DIR_PFVF, pci_dev->max_vfs,
+ intr_offset);
if (rc)
goto iounmap;
/* PF -> VF UP messages */
rc = otx2_mbox_init(&dev->mbox_vfpf_up, (uintptr_t)hwbase,
if (rc)
goto iounmap;
/* PF -> VF UP messages */
rc = otx2_mbox_init(&dev->mbox_vfpf_up, (uintptr_t)hwbase,
- bar2, MBOX_DIR_PFVF_UP, pci_dev->max_vfs);
+ bar2, MBOX_DIR_PFVF_UP, pci_dev->max_vfs,
+ intr_offset);
if (rc)
goto mbox_fini;
}
if (rc)
goto mbox_fini;
}