From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gaetan Rivet Subject: [PATCH v2 6/8] pci: fix generic driver pointer on probe error Date: Tue, 11 Jul 2017 01:19:05 +0200 Message-ID: <50122fe5e38690608e5e51fa5b305efce3dce361.1499728330.git.gaetan.rivet@6wind.com> References: Cc: Gaetan Rivet , stable@dpdk.org To: dev@dpdk.org Return-path: Received: from mail-wr0-f170.google.com (mail-wr0-f170.google.com [209.85.128.170]) by dpdk.org (Postfix) with ESMTP id 6C7377CAE for ; Tue, 11 Jul 2017 01:19:31 +0200 (CEST) Received: by mail-wr0-f170.google.com with SMTP id 77so159145112wrb.1 for ; Mon, 10 Jul 2017 16:19:31 -0700 (PDT) In-Reply-To: In-Reply-To: References: 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 field is set but never resetted on error. This marks the device as being attached while it is not, and forbid further attempts to hotplug it. Fixes: 7917d5f5ea46 ("pci: initialize generic driver pointer") Cc: stable@dpdk.org Signed-off-by: Gaetan Rivet --- 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 b100525..9cc4148 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -237,6 +237,7 @@ rte_pci_probe_one_driver(struct rte_pci_driver *dr, ret = dr->probe(dr, dev); if (ret) { dev->driver = NULL; + dev->device.driver = NULL; if ((dr->drv_flags & RTE_PCI_DRV_NEED_MAPPING) && /* Don't unmap if device is unsupported and * driver needs mapped resources. -- 2.1.4