DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH dpdk v2] pci: Initialize common rte driver pointer
@ 2017-04-26  8:07 Alexey Kardashevskiy
  2017-04-26  9:44 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Alexey Kardashevskiy @ 2017-04-26  8:07 UTC (permalink / raw)
  To: dev; +Cc: 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>
---
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(+)

diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c
index 6f0d4d8e4..b6b41be31 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.11.0

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [dpdk-dev] [PATCH dpdk v2] pci: Initialize common rte driver pointer
  2017-04-26  8:07 [dpdk-dev] [PATCH dpdk v2] pci: Initialize common rte driver pointer Alexey Kardashevskiy
@ 2017-04-26  9:44 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2017-04-26  9:44 UTC (permalink / raw)
  To: Alexey Kardashevskiy; +Cc: dev

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2017-04-26  9:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-26  8:07 [dpdk-dev] [PATCH dpdk v2] pci: Initialize common rte driver pointer Alexey Kardashevskiy
2017-04-26  9:44 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).