Skip to content

Commit

Permalink
raw/octeontx2_dma: assign PCI device in DPI VF
Browse files Browse the repository at this point in the history
[ upstream commit 692c0e7 ]

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: 4495bd8 ("raw/octeontx2_dma: support multiple DPI blocks")

Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
  • Loading branch information
Radha Mohan Chintakuntla authored and steevenlee committed May 8, 2021
1 parent d2d4346 commit 45b58e4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,7 @@ otx2_dpi_rawdev_probe(struct rte_pci_driver *pci_drv __rte_unused,
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;
Expand Down

0 comments on commit 45b58e4

Please sign in to comment.