From mboxrd@z Thu Jan 1 00:00:00 1970 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) 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=reKzQ/ZtGicApyIwCBKnZoxbpfjve2KjNrrDaQtjDsA=; b=PLkwnzdRa/ucc5W3zsronmspSLpR6/oLiknjJyvdQJwiYdQc8Jd0ZuSD2nCnIgwb3L AmFEFosLCM82VPal68esNlEoJaqXGx6BrC6zB0DbcZynljEnnA6n2DmCdgcJi4iPOrBW 7f3WFE3jjxtG3M/IxYQIISBT3CkfCXL0uUr1HPuteXPG4xMaZuIzMws3/yVM0XsrBDDm LYICFcNCh32ca/206V40C3Dx1EKaeFmCKl9pEcZktvEqnbkO8WH0XNHAIxGUOKYvnVS5 X/QOnW6xpvOWblHnlGRG/TyprMC9rfMe6bAF1X5gfRVSlmkioF2CGeBnBKuCJ4xaQjG1 hrSw== 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=reKzQ/ZtGicApyIwCBKnZoxbpfjve2KjNrrDaQtjDsA=; b=LIgbJv5NXsIiG1Ou5VNiwOzWXROgYVz0k68QmYB5ww7VYdFKAebybdr+HCIF54sl3z vJb7CpVSkDms6q9PEaK/KMpWA2wgaZe0Nk1RuNX6GeDnJz2A02cSv0Ft4p8tlxghM9D0 7hbNrlpRwmw+f5bTB4NYK/fnL3J5umbTUvopjZvowzV5/I4P1YaLDhemzns3plS5qTOs +090DZjiRHjfFpjoA/2YzextdXF2fjrIkYwcYlh7vwBV3IFne9G4KhudMIuLTHqv93/L tU/dqXJvKr3doz1ZhqMmsQyUf8UZb4eLOmcgP6JmvcJybK3JYlPjhrLOp+bZl1+MX1M3 Z92A== X-Gm-Message-State: AIVw1103b3uMTW53v4yq4yziTh5TVSAL9jfO6Yf4rz93HhwrwfQWGTM0 10OCSdD2vImJx/Uz/uU= X-Received: by 10.28.67.6 with SMTP id q6mr9553270wma.6.1499728770882; Mon, 10 Jul 2017 16:19:30 -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 j190sm43773wmd.22.2017.07.10.16.19.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 10 Jul 2017 16:19:30 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet , stable@dpdk.org Date: Tue, 11 Jul 2017 01:19:05 +0200 Message-Id: <50122fe5e38690608e5e51fa5b305efce3dce361.1499728330.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 v2 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: Mon, 10 Jul 2017 23:19:32 -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 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