From 7917d5f5ea46e6e812ffbcbb451533bee1252428 Mon Sep 17 00:00:00 2001 From: Alexey Kardashevskiy Date: Wed, 26 Apr 2017 18:07:24 +1000 Subject: [PATCH] pci: initialize generic driver pointer 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 --- lib/librte_eal/common/eal_common_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 6f0d4d8e43..b6b41be311 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -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); -- 2.20.1