linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] acpiphp: create companion ACPI devices before creating PCI devices
@ 2013-01-30 16:10 Jiang Liu
  2013-01-30 16:10 ` [PATCH 2/2] acpiphp: remove dead code for PCI host bridge hotplug Jiang Liu
  2013-02-01 23:06 ` [PATCH 1/2] acpiphp: create companion ACPI devices before creating PCI devices Bjorn Helgaas
  0 siblings, 2 replies; 11+ messages in thread
From: Jiang Liu @ 2013-01-30 16:10 UTC (permalink / raw)
  To: Bjorn Helgaas, Yinghai Lu, Rafael J . Wysocki
  Cc: Jiang Liu, Yijing Wang, linux-kernel, linux-pci

From: Jiang Liu <jiang.liu@huawei.com>

With commit 4f535093cf8f6da8c "PCI: Put pci_dev in device tree as
early as possible", companion ACPI devices should be created before
creating correspoding PCI devices, otherwise it will break the ACPI
PCI binding logic.

Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
---
Hi Bjorn,
	This patch set applies to your pci/yinghai-root-bus branch.
There are still other potential bugs in the acpiphp driver under
investigation. So I will send out these two first to catch up with
the 3.9 merging window.
	Thanks!
	Gerry
---
 drivers/pci/hotplug/acpiphp_glue.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c
index bd784ff..acb7af2 100644
--- a/drivers/pci/hotplug/acpiphp_glue.c
+++ b/drivers/pci/hotplug/acpiphp_glue.c
@@ -839,6 +839,9 @@ static int __ref enable_device(struct acpiphp_slot *slot)
 	if (slot->flags & SLOT_ENABLED)
 		goto err_exit;
 
+	list_for_each_entry(func, &slot->funcs, sibling)
+		acpiphp_bus_add(func);
+
 	num = pci_scan_slot(bus, PCI_DEVFN(slot->device, 0));
 	if (num == 0) {
 		/* Maybe only part of funcs are added. */
@@ -862,9 +865,6 @@ static int __ref enable_device(struct acpiphp_slot *slot)
 		}
 	}
 
-	list_for_each_entry(func, &slot->funcs, sibling)
-		acpiphp_bus_add(func);
-
 	pci_bus_assign_resources(bus);
 	acpiphp_sanitize_bus(bus);
 	acpiphp_set_hpp_values(bus);
-- 
1.7.9.5


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2013-02-02  2:25 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-01-30 16:10 [PATCH 1/2] acpiphp: create companion ACPI devices before creating PCI devices Jiang Liu
2013-01-30 16:10 ` [PATCH 2/2] acpiphp: remove dead code for PCI host bridge hotplug Jiang Liu
2013-01-30 17:27   ` Yinghai Lu
2013-01-31 15:37     ` Jiang Liu
2013-01-31 15:59       ` Yinghai Lu
2013-02-01  8:50         ` Yijing Wang
2013-02-02  0:01           ` Yinghai Lu
2013-02-01 23:18   ` Bjorn Helgaas
2013-02-01 23:06 ` [PATCH 1/2] acpiphp: create companion ACPI devices before creating PCI devices Bjorn Helgaas
2013-02-01 23:17   ` Bjorn Helgaas
2013-02-02  2:24   ` Yijing Wang

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).