From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6B90BC433E0 for ; Tue, 30 Jun 2020 08:02:26 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 3C1A520768 for ; Tue, 30 Jun 2020 08:02:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="oKxVuVQj" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 3C1A520768 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linuxfoundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=iommu-bounces@lists.linux-foundation.org Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 1AB6085BCF; Tue, 30 Jun 2020 08:02:26 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id bQ1WeqJh8AzL; Tue, 30 Jun 2020 08:02:25 +0000 (UTC) Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [140.211.9.56]) by fraxinus.osuosl.org (Postfix) with ESMTP id A58FA85AE9; Tue, 30 Jun 2020 08:02:25 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 9A919C0865; Tue, 30 Jun 2020 08:02:25 +0000 (UTC) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists.linuxfoundation.org (Postfix) with ESMTP id 8447CC016E for ; Tue, 30 Jun 2020 08:02:24 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 6FD7085B0C for ; Tue, 30 Jun 2020 08:02:24 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Jldyh_QLmaJB for ; Tue, 30 Jun 2020 08:02:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 0348885AE9 for ; Tue, 30 Jun 2020 08:02:24 +0000 (UTC) Received: from localhost (unknown [84.241.197.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D604B2067D; Tue, 30 Jun 2020 08:02:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1593504143; bh=l9em1xuyarZs6WU6lGVQVTbwQfuLz7IEaQ69vwvjbR0=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=oKxVuVQjOlEV89XeGjZL+EsE+ssdpkUV5c1dxojW7lqFvXHdE3E11ratNJHAnBnMQ zeCuWnHl/2+If7Tp5g3qPlSHj8wOwKEjZeaSuNw82UTwMiTXYQ7SO8ce8ixj5l/2yI i/Qn7sOpT0LMWB/KPsX/pjQEeVZYwm82uqwScFWY= Date: Tue, 30 Jun 2020 10:02:20 +0200 From: Greg Kroah-Hartman To: Rajat Jain Subject: Re: [PATCH v2 4/7] PCI: Add device even if driver attach failed Message-ID: <20200630080220.GC619174@kroah.com> References: <20200630044943.3425049-1-rajatja@google.com> <20200630044943.3425049-5-rajatja@google.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200630044943.3425049-5-rajatja@google.com> Cc: Todd Broch , linux-pci@vger.kernel.org, lalithambika.krishnakumar@intel.com, Heikki Krogerus , Diego Rivas , Jean-Philippe Brucker , Furquan Shaikh , Raj Ashok , Saravana Kannan , linux-acpi@vger.kernel.org, Christian Kellner , Mattias Nissler , Jesse Barnes , Len Brown , Rajat Jain , Prashant Malani , Suzuki K Poulose , Aaron Durbin , Alex Williamson , Bjorn Helgaas , Mika Westerberg , Bernie Keany , Duncan Laurie , "Rafael J. Wysocki" , linux-kernel@vger.kernel.org, iommu@lists.linux-foundation.org, Arnd Bergmann , oohall@gmail.com, Benson Leung , David Woodhouse , Alex Levin X-BeenThere: iommu@lists.linux-foundation.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Development issues for Linux IOMMU support List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: iommu-bounces@lists.linux-foundation.org Sender: "iommu" On Mon, Jun 29, 2020 at 09:49:40PM -0700, Rajat Jain wrote: > device_attach() returning failure indicates a driver error while trying to > probe the device. In such a scenario, the PCI device should still be added > in the system and be visible to the user. > > This patch partially reverts: > commit ab1a187bba5c ("PCI: Check device_attach() return value always") > > Signed-off-by: Rajat Jain > Reviewed-by: Greg Kroah-Hartman > --- > v2: Cosmetic change in commit log. > Add Greg's "reviewed-by" > > drivers/pci/bus.c | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) > > diff --git a/drivers/pci/bus.c b/drivers/pci/bus.c > index 8e40b3e6da77d..3cef835b375fd 100644 > --- a/drivers/pci/bus.c > +++ b/drivers/pci/bus.c > @@ -322,12 +322,8 @@ void pci_bus_add_device(struct pci_dev *dev) > > dev->match_driver = true; > retval = device_attach(&dev->dev); > - if (retval < 0 && retval != -EPROBE_DEFER) { > + if (retval < 0 && retval != -EPROBE_DEFER) > pci_warn(dev, "device attach failed (%d)\n", retval); > - pci_proc_detach_device(dev); > - pci_remove_sysfs_dev_files(dev); > - return; > - } > > pci_dev_assign_added(dev, true); > } This should go first in the series, and cc: stable and get merged now. No need to tie it to this series at all. Or just an independant patch, it doesn't have much to do with this series, it's a bugfix. thanks, greg k-h _______________________________________________ iommu mailing list iommu@lists.linux-foundation.org https://lists.linuxfoundation.org/mailman/listinfo/iommu