From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f174.google.com (mail-wr0-f174.google.com [209.85.128.174]) by dpdk.org (Postfix) with ESMTP id AF52B567C for ; Sun, 9 Jul 2017 03:46:05 +0200 (CEST) Received: by mail-wr0-f174.google.com with SMTP id c11so93720204wrc.3 for ; Sat, 08 Jul 2017 18:46: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=reKzQ/ZtGicApyIwCBKnZoxbpfjve2KjNrrDaQtjDsA=; b=pOJzvqfQHdzlfhKhI5VOOn5yl/O+ywgnoAfTLowGGqTN7/mlYi8UWzUPduygPoE5SV lUAu8tCpoAKkbTvJXzEn9VaI0nGxFpGIkQpqFU5BeXgMqE3tudDJfD4EaFKy7TtOfife b8rzpvCmVr1gP+r2WPHw3sLqWeZRaGOnSfW0/zTep937ivl0oKIYp/nz6RQUPYv/+SIh vRIGHaE1kyVqpbCgCCAlMqIM3BFnQGfsJdTMCRTKFeBZX504HAtJLUcNTpLYZdpH4ZqQ HnUDYEndTLOZ5QS1kpIPDI9WFOW1nch4BgFR4jabfri4Vi/YCOYhdXpXl/sShgO78m0v petQ== 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=NkNEHzvZi3NNCgAFTDTFoz9NIubOd9V183yxCxCCFWNewrjp2+UuBF3pTagL05GlrZ Sr4amAJ9mVjv1LmmBOaCp7PrX8GBIjaK0whO5ucxNlzU9MXKQQEYsJ2r4rwfxeI+S0tb kaAGkx4yBRQPbm5aA+VPW3UpaqjHlgUwJNqSgFFHY5Ei7lsN/DWfbXHHkuDvFdul84lo k9Xl1dwc0Jip1y0ZORJWAs951lunDvdQNI1dTayWBh9KFO7KZRKGk2YGSj7P/Gus3WJ3 LAsrAstluNefDvE7Rt0S2Sm9UY0G9KkqxPU8DyKQ2Cehl23MLpqMyosb1TuYyQ01khPN FB8Q== X-Gm-Message-State: AIVw110f5XkJ9LGyiTMVdo/Z4YGmmnNk8h7/z0wf8XFWDGcj5wSBFhB6 GMhRU6lq0mralN6C89M= X-Received: by 10.28.12.66 with SMTP id 63mr3069705wmm.130.1499564765176; Sat, 08 Jul 2017 18:46:05 -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 h130sm2430609wmd.34.2017.07.08.18.46.04 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 08 Jul 2017 18:46:04 -0700 (PDT) From: Gaetan Rivet To: dev@dpdk.org Cc: Gaetan Rivet , stable@dpdk.org Date: Sun, 9 Jul 2017 03:45:42 +0200 Message-Id: <66edddf78fe0b6e1f156014f1e5c3c07bef209ad.1499563730.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 6/9] 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: Sun, 09 Jul 2017 01:46:06 -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