From patchwork Thu Apr 20 07:23:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kardashevskiy X-Patchwork-Id: 23777 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 57D7058CE; Thu, 20 Apr 2017 09:24:15 +0200 (CEST) Received: from ozlabs.ru (ozlabs.ru [107.173.13.209]) by dpdk.org (Postfix) with ESMTP id 9AEAC2C50 for ; Thu, 20 Apr 2017 09:24:09 +0200 (CEST) Received: from vpl2.ozlabs.ibm.com (localhost [IPv6:::1]) by ozlabs.ru (Postfix) with ESMTP id 669F83A601CB; Thu, 20 Apr 2017 03:24:23 -0400 (EDT) From: Alexey Kardashevskiy To: dev@dpdk.org Cc: Alexey Kardashevskiy , JPF@zurich.ibm.com, Gowrishankar Muthukrishnan Date: Thu, 20 Apr 2017 17:23:59 +1000 Message-Id: <20170420072402.38106-3-aik@ozlabs.ru> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170420072402.38106-1-aik@ozlabs.ru> References: <20170420072402.38106-1-aik@ozlabs.ru> Subject: [dpdk-dev] [PATCH dpdk 2/5] pci: Initialize common rte driver pointer X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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 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);