From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f178.google.com (mail-wr0-f178.google.com [209.85.128.178]) by dpdk.org (Postfix) with ESMTP id 65E777CD1 for ; Wed, 12 Jul 2017 01:26:05 +0200 (CEST) Received: by mail-wr0-f178.google.com with SMTP id c11so9803804wrc.3 for ; Tue, 11 Jul 2017 16:26:05 -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=YIEuODL3aeRhakPr9t6q9lct+cnA2KZYgl0OSBeT5eGYqTKGTSGXDaqm9M3nYk02/l rP8qaed6FW8YCMXCuW1FC5AgAFdzZe2mYnhydxhBlbLQTBlLs5kNSkYQab0UwWuhjUL3 w8WB6yZkYbdrw08X6kTZxkDvR+eA4S7p3HjJICO8uY+sazOGczvAFjBbHIufsNjJcnqn 4yziqR0/zbmuGMRosUZJMQez1GFBaYVO05zD2MP5uXY4x1yokVWucVoo1gq6cc/rKc+b 7BCNsurFOggOlpHgl71mlr7e/P2eYi8S6cBKqnU1HP3DzDeQrMF7SEtecM3oiDrljx7E Azeg== 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=eiBOSLAU5KMhr33fa2MXt2Mz8pftnE1trADDszlvT6n0Xd52PRziA4QQ4wSHvv1Kqe GRAVWK5D/GpLNpPYehmQc4nTohUDhBjnArrMw/H6Diha8Nmh7ijeTZqpnaZyWCja90iC dCMKutY0YfO6GS+LINaTrWic8LVe/xuolYqYdbFRYAeczjhrRmpdFoK3gK52z1XAFLAK BCHHTgoQIw3WljVbx4rR6KvmzuUTePVvMvo/7irFoCH2jlEko1QLUQl0ks+0mpiqaT0d LpxxdLbGCaUro4eMYoyOl8BJFnytRfQSUlq8REL2FXKdczKhlXDxTwarvaNLFJiVON2C 79jA== X-Gm-Message-State: AIVw113ptB5RL+Bgpx9DIzPKSyZbMsUuSidvqdbsCZ7GaeyV4xcrpnZP xu0rHqJfWrA4kjO32cA= X-Received: by 10.223.153.238 with SMTP id y101mr1116045wrb.168.1499815564676; Tue, 11 Jul 2017 16:26:04 -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 66sm407576wmj.29.2017.07.11.16.26.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 11 Jul 2017 16:26:03 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet , stable@dpdk.org Date: Wed, 12 Jul 2017 01:25:40 +0200 Message-Id: <9474d104eb6aa07b7b156cdb884d2b6bbfd6c1ae.1499814957.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 v3 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: Tue, 11 Jul 2017 23:26:05 -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