diff options
author | Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com> | 2006-02-27 08:15:49 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2006-03-23 17:35:16 -0500 |
commit | 7c8f25da12a3dda46fb730699582895d5fc51287 (patch) | |
tree | ad56ba9fbbd688963cbefe541b77b8d3de21959f /drivers/pci/hotplug/acpiphp_glue.c | |
parent | 8e77af6a9a9b1eefdb538894b20ed41f65b65ab7 (diff) |
[PATCH] acpiphp: Scan slots under the nested P2P bridge
Current ACPIPHP driver scans only slots under the top level PCI-to-PCI
bridge. So hotplug PCI slots under the nested PCI-to-PCI bridge would
not be detected. For example, if the system has the ACPI namespace
like below, hotplug slots woule not be detected.
Device (PCI0) { /* Root bridge */
Name (_HID, "PNP0A03")
Device (P2PA) { /* PCI-to-PCI bridge */
Name (_ADR, ...)
Device (P2PB) { /* PCI-to-PCI bridge */
Name (_ADR, ...)
Device (S0F0) { /* hotplug slot */
Name (_ADR, ...)
Name (_SUN, ...)
Method (_EJ0, ...) { ... }
}
...
Device (S0F7) { /* hotplug slot */
Name (_ADR, ...)
Name (_SUN, ...)
Method (_EJ0, ...) { ... }
}
Device (S1F0) { /* hotplug slot */
Name (_ADR, ...)
Name (_SUN, ...)
Method (_EJ0, ...) { ... }
}
...
}
}
}
This patch fixes this issue.
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp_glue.c')
-rw-r--r-- | drivers/pci/hotplug/acpiphp_glue.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 21fa13e84470..cbd5893d198e 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c | |||
@@ -463,6 +463,12 @@ find_p2p_bridge(acpi_handle handle, u32 lvl, void *context, void **rv) | |||
463 | add_p2p_bridge(handle, dev); | 463 | add_p2p_bridge(handle, dev); |
464 | } | 464 | } |
465 | 465 | ||
466 | /* search P2P bridges under this p2p bridge */ | ||
467 | status = acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, (u32)1, | ||
468 | find_p2p_bridge, dev->subordinate, NULL); | ||
469 | if (ACPI_FAILURE(status)) | ||
470 | warn("find_p2p_bridge faied (error code = 0x%x)\n", status); | ||
471 | |||
466 | out: | 472 | out: |
467 | pci_dev_put(dev); | 473 | pci_dev_put(dev); |
468 | return AE_OK; | 474 | return AE_OK; |
@@ -603,7 +609,8 @@ static void remove_bridge(acpi_handle handle) | |||
603 | } else { | 609 | } else { |
604 | /* clean-up p2p bridges under this host bridge */ | 610 | /* clean-up p2p bridges under this host bridge */ |
605 | acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, | 611 | acpi_walk_namespace(ACPI_TYPE_DEVICE, handle, |
606 | (u32)1, cleanup_p2p_bridge, NULL, NULL); | 612 | ACPI_UINT32_MAX, cleanup_p2p_bridge, |
613 | NULL, NULL); | ||
607 | } | 614 | } |
608 | } | 615 | } |
609 | 616 | ||