From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f41.google.com (mail-wm0-f41.google.com [74.125.82.41]) by dpdk.org (Postfix) with ESMTP id B2D70568A for ; Sat, 15 Jul 2017 19:57:06 +0200 (CEST) Received: by mail-wm0-f41.google.com with SMTP id w126so44532811wme.0 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=Id0R48nVsIEz872TIwh9vCesPD41XRKbpx1eRToGT2gm0TSyUj4jNohnAVOx3n3cZI fADPvNw0ThdZMdv6cW2CSLSFWWKwiPGX8e8ygG7BWSdlRGhbG4OrbqKkZHmcs7K3gI7j lDwPOul3jxJ6zpGK63oOOUnbJ0K3YZv0UjbvTG0RgdiLO02DP+2cdG7nW9UZG/9/qd/U 9eUbwvTfpJICEnrokyxUFP3vWx9BRW0kTyLmfHJ9UXU0vApgcd39vrOKoPrMUL4Ba76w Z6oYId1x4uVUXTkvDF2B0T190RJNNxF4W8VBDZY1P4txHpKTAs54//zhq9+8bWzG0vgt RNGQ== X-Gm-Message-State: AIVw110tRoU5yyWUaegGnqf5RZ06fCiRGR8AZPWB0AvruXmFwPawe+Ib j2qHKPcbUdLRG7c1xf8= 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-stable] [PATCH v4 6/8] pci: fix generic driver pointer on probe error X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches 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