diff mbox series

[v2] raw/octeontx2_dma: fix unavailable PCI device in dpivf

Message ID 20210409080627.123195-1-radhac@marvell.com (mailing list archive)
State Accepted
Delegated to: Thomas Monjalon
Headers show
Series [v2] raw/octeontx2_dma: fix unavailable PCI device in dpivf | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/Intel-compilation success Compilation OK
ci/github-robot success github build: passed
ci/travis-robot success travis build: passed
ci/checkpatch warning coding style issues

Commit Message

Radha Mohan Chintakuntla April 9, 2021, 8:06 a.m. UTC
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")

Signed-off-by: Radha Mohan Chintakuntla <radhac@marvell.com>
---
 drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Thomas Monjalon April 15, 2021, 2:43 p.m. UTC | #1
09/04/2021 10:06, Radha Mohan Chintakuntla:
> 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.

The sentence is too long and complex.
My advice: make multiple short sentences.

> 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>

Applied with title "raw/octeontx2_dma: assign PCI device in DPI VF"
diff mbox series

Patch

diff --git a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
index efdba2779b..8c01f25ec7 100644
--- a/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
+++ b/drivers/raw/octeontx2_dma/otx2_dpi_rawdev.c
@@ -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;