[dpdk-dev,v2] pci: Initialize common rte driver pointer
Checks
Commit Message
The existing code initializes a PCI driver pointer but not the common one.
As the result, ring_dma_zone_reserve() in drivers/net/bnx2x/bnx2x_rxtx.c
crashed as dev->device->driver==NULL.
This adds missing initialization.
Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
---
Changes:
v2:
* no change, just posted separately from other patches as was requested
---
lib/librte_eal/common/eal_common_pci.c | 1 +
1 file changed, 1 insertion(+)
Comments
26/04/2017 10:07, Alexey Kardashevskiy:
> The existing code initializes a PCI driver pointer but not the common one.
> As the result, ring_dma_zone_reserve() in drivers/net/bnx2x/bnx2x_rxtx.c
> crashed as dev->device->driver==NULL.
>
> This adds missing initialization.
>
> Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Applied, thanks
@@ -244,6 +244,7 @@ rte_eal_pci_probe_one_driver(struct rte_pci_driver *dr,
/* reference driver structure */
dev->driver = dr;
+ dev->device.driver = &dr->driver;
/* call the driver probe() function */
ret = dr->probe(dr, dev);