The PCI device address is being used for sending mailbox which was
introduced in previous commit which replaced the macros so that
multiple DPI blocks in the hardware can be supported.
This patch fixes a NULL pointer access by assigning the PCI device
structure to dpivf.
Fixes:
4495bd887d38 ("raw/octeontx2_dma: support multiple DPI blocks")
Cc: stable@dpdk.org
Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
vf_id = ((pci_dev->addr.devid & 0x1F) << 3) |
(pci_dev->addr.function & 0x7);
vf_id -= 1;
+ dpivf->dev = pci_dev;
dpivf->state = DPI_QUEUE_START;
dpivf->vf_id = vf_id;
dpivf->vf_bar0 = (uintptr_t)pci_dev->mem_resource[0].addr;