From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f45.google.com (mail-wm0-f45.google.com [74.125.82.45]) by dpdk.org (Postfix) with ESMTP id 053A256A1 for ; Sat, 15 Jul 2017 19:57:06 +0200 (CEST) Received: by mail-wm0-f45.google.com with SMTP id 62so44504418wmw.1 for ; Sat, 15 Jul 2017 10:57:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=mnMNzkJ9XXqPDDIQtUeUNJZR4SczRBq2gqpAeuhgwGo=; b=k/WkUCd2ipsaGj6swvcxKSe/I4eaz4rvjbE31ailhUcBr8x2LQJqdBg+wMAlX254DY zsxEpss91Hr3bEyxGe/Apc79QOWKkwJ4Hpw9GSL7/nZP/Mwf9bqP6IAHC39xktPHC6Dn AesejGKWbAgZ+2/uc5BXAuDH8X7gNY85tJdqNp5oZ8iVKm8/LFRfRar3BHFG26MG1qwI /zd+m3x0Cmq5KXhZdTP4XwKFSus0Wqx/Xfoy1t2nMpTug+f9dphi6K+c25kodltqKFo/ XTq6DoyM/iv8nJXtRqHunuhCWHm4hTrY6Pv2LjNPC1eHlwxehV9ZdF71XzM2fnAXqdWk dXAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=mnMNzkJ9XXqPDDIQtUeUNJZR4SczRBq2gqpAeuhgwGo=; b=GJlm9DnY9kFyrxMQ3FUfoSfHR1xlXmrMYr2l2grldqDiUjPA3YW/FaKDHMpSbH+n/o i/805glG3CO8x898GkpoxpLO2TvKgrVWNVBtSXBhYnxoPiSU6jGiKA0cXI0WJIGhlfIH wPCR+IJ/5bpCWgHCT1z3lrtlNt16bIQztjsf3QJyA9dlcneFB22MchhhhTpWZQhY9ca9 xREiU7VsU0+HmpzO+yRyaGUvHFjPgr/e+IDB2C/xpqyvhpKo2RqL9JujluzQbhc+StSE oekNgx3yTGsvStlBnF/p/f9ntaI5DXdQ8dswb9AOY0Hqgcc843J8utbUtcEJG1wcGzcZ QAKg== X-Gm-Message-State: AIVw110Lzgce1cwX7vqw870DrrPJXnIeLhvI7/WVokN12NmgDeHG03tg 7p09K5+9JZ5A+nPtdaI= X-Received: by 10.28.99.215 with SMTP id x206mr1056978wmb.21.1500141426037; Sat, 15 Jul 2017 10:57:06 -0700 (PDT) Received: from bidouze.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 79sm2479445wmj.2.2017.07.15.10.57.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 15 Jul 2017 10:57:05 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet , stable@dpdk.org Date: Sat, 15 Jul 2017 19:56:40 +0200 Message-Id: <8c4777d3c36ae7427c8fbbfd15a7f96ffeceb58e.1499964391.git.gaetan.rivet@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: In-Reply-To: References: Subject: [dpdk-dev] [PATCH v4 6/8] pci: fix generic driver pointer on probe error 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: , X-List-Received-Date: Sat, 15 Jul 2017 17:57:07 -0000 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 45e697e..0a4062c 100644 --- a/lib/librte_eal/common/eal_common_pci.c +++ b/lib/librte_eal/common/eal_common_pci.c @@ -245,6 +245,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