* [PATCH RESEND v2] PCI: Add device even if driver attach failed
@ 2020-07-06 23:32 Rajat Jain
2020-07-07 6:57 ` Greg Kroah-Hartman
2020-07-07 22:36 ` Bjorn Helgaas
0 siblings, 2 replies; 3+ messages in thread
From: Rajat Jain @ 2020-07-06 23:32 UTC (permalink / raw)
To: David Woodhouse, Lu Baolu, Joerg Roedel, Bjorn Helgaas,
Rafael J. Wysocki, Len Brown, iommu, linux-kernel, linux-pci,
linux-acpi, Raj Ashok, lalithambika.krishnakumar,
Mika Westerberg, Jean-Philippe Brucker, Prashant Malani,
Benson Leung, Todd Broch, Alex Levin, Mattias Nissler,
Rajat Jain, Bernie Keany, Aaron Durbin, Diego Rivas,
Duncan Laurie, Furquan Shaikh, Jesse Barnes, Christian Kellner,
Alex Williamson, Greg Kroah-Hartman, oohall, Saravana Kannan,
Suzuki K Poulose, Arnd Bergmann, Heikki Krogerus, stable
Cc: Rajat Jain
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 <rajatja@google.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
Resending to stable, independent from other patches per Greg's suggestion
v2: Add Greg's reviewed by, fix commit log
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);
}
--
2.27.0.212.ge8ba1cc988-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND v2] PCI: Add device even if driver attach failed
2020-07-06 23:32 [PATCH RESEND v2] PCI: Add device even if driver attach failed Rajat Jain
@ 2020-07-07 6:57 ` Greg Kroah-Hartman
2020-07-07 22:36 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2020-07-07 6:57 UTC (permalink / raw)
To: Rajat Jain
Cc: David Woodhouse, Lu Baolu, Joerg Roedel, Bjorn Helgaas,
Rafael J. Wysocki, Len Brown, iommu, linux-kernel, linux-pci,
linux-acpi, Raj Ashok, lalithambika.krishnakumar,
Mika Westerberg, Jean-Philippe Brucker, Prashant Malani,
Benson Leung, Todd Broch, Alex Levin, Mattias Nissler,
Rajat Jain, Bernie Keany, Aaron Durbin, Diego Rivas,
Duncan Laurie, Furquan Shaikh, Jesse Barnes, Christian Kellner,
Alex Williamson, oohall, Saravana Kannan, Suzuki K Poulose,
Arnd Bergmann, Heikki Krogerus, stable
On Mon, Jul 06, 2020 at 04:32: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 <rajatja@google.com>
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> Resending to stable, independent from other patches per Greg's suggestion
> v2: Add Greg's reviewed by, fix commit log
<formletter>
This is not the correct way to submit patches for inclusion in the
stable kernel tree. Please read:
https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
for how to do this properly.
</formletter>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH RESEND v2] PCI: Add device even if driver attach failed
2020-07-06 23:32 [PATCH RESEND v2] PCI: Add device even if driver attach failed Rajat Jain
2020-07-07 6:57 ` Greg Kroah-Hartman
@ 2020-07-07 22:36 ` Bjorn Helgaas
1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Helgaas @ 2020-07-07 22:36 UTC (permalink / raw)
To: Rajat Jain
Cc: David Woodhouse, Lu Baolu, Joerg Roedel, Bjorn Helgaas,
Rafael J. Wysocki, Len Brown, iommu, linux-kernel, linux-pci,
linux-acpi, Raj Ashok, lalithambika.krishnakumar,
Mika Westerberg, Jean-Philippe Brucker, Prashant Malani,
Benson Leung, Todd Broch, Alex Levin, Mattias Nissler,
Rajat Jain, Bernie Keany, Aaron Durbin, Diego Rivas,
Duncan Laurie, Furquan Shaikh, Jesse Barnes, Christian Kellner,
Alex Williamson, Greg Kroah-Hartman, oohall, Saravana Kannan,
Suzuki K Poulose, Arnd Bergmann, Heikki Krogerus, stable
On Mon, Jul 06, 2020 at 04:32: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 <rajatja@google.com>
> Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> ---
> Resending to stable, independent from other patches per Greg's suggestion
> v2: Add Greg's reviewed by, fix commit log
Applied to pci/enumeration for v5.8 with stable tag, thanks!
> 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);
> }
> --
> 2.27.0.212.ge8ba1cc988-goog
>
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2020-07-07 22:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-06 23:32 [PATCH RESEND v2] PCI: Add device even if driver attach failed Rajat Jain
2020-07-07 6:57 ` Greg Kroah-Hartman
2020-07-07 22:36 ` Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).