Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c5114626 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull PCI fixes from Bjorn Helgaas:
 "Since v4.5, we've WARNed during resume if a PCI device, including a
  Thunderbolt device, was added while we were suspended.  A change we
  merged for v4.6-rc1 turned that warning into a system hang.  These
  enumeration patches from Lukas Wunner fix this issue:

   - Fix BUG on device attach failure
   - Do not treat EPROBE_DEFER as device attach failure"

* tag 'pci-v4.6-fixes-3' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
  PCI: Do not treat EPROBE_DEFER as device attach failure
  PCI: Fix BUG on device attach failure
parents 7ec02e3b 9a2a5a63
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -294,7 +294,7 @@ void pci_bus_add_device(struct pci_dev *dev)

	dev->match_driver = true;
	retval = device_attach(&dev->dev);
	if (retval < 0) {
	if (retval < 0 && retval != -EPROBE_DEFER) {
		dev_warn(&dev->dev, "device attach failed (%d)\n", retval);
		pci_proc_detach_device(dev);
		pci_remove_sysfs_dev_files(dev);
@@ -324,7 +324,9 @@ void pci_bus_add_devices(const struct pci_bus *bus)
	}

	list_for_each_entry(dev, &bus->devices, bus_list) {
		BUG_ON(!dev->is_added);
		/* Skip if device attach failed */
		if (!dev->is_added)
			continue;
		child = dev->subordinate;
		if (child)
			pci_bus_add_devices(child);