===================================================================
@@ -665,6 +665,7 @@ static void handle_root_bridge_removal(s
kfree(ej_event);
}
+void (*acpiphp_check_host_bridge)(acpi_handle handle);
static void _handle_hotplug_event_root(struct work_struct *work)
{
struct acpi_pci_root *root;
@@ -687,7 +688,11 @@ static void _handle_hotplug_event_root(s
/* bus enumerate */
printk(KERN_DEBUG "%s: Bus check notify on %s\n", __func__,
(char *)buffer.pointer);
- if (!root)
+ if (root) {
+ request_module("acpiphp");
+ if (acpiphp_check_host_bridge)
+ acpiphp_check_host_bridge(handle);
+ } else
handle_root_bridge_insertion(handle);
break;
===================================================================
@@ -1122,6 +1122,18 @@ check_sub_bridges(acpi_handle handle, u3
return AE_OK ;
}
+static void __acpiphp_check_host_bridge(acpi_handle handle)
+{
+ struct acpiphp_bridge *bridge;
+
+ bridge = acpiphp_handle_to_bridge(handle);
+ if (bridge)
+ acpiphp_check_bridge(bridge);
+
+ acpi_walk_namespace(ACPI_TYPE_DEVICE, handle,
+ ACPI_UINT32_MAX, check_sub_bridges, NULL, NULL, NULL);
+}
+
static void _handle_hotplug_event_bridge(struct work_struct *work)
{
struct acpiphp_bridge *bridge;
@@ -1305,6 +1317,7 @@ static struct acpi_pci_driver acpi_pci_h
int __init acpiphp_glue_init(void)
{
acpi_pci_register_driver(&acpi_pci_hp_driver);
+ acpiphp_check_host_bridge = __acpiphp_check_host_bridge;
return 0;
}
@@ -1317,6 +1330,7 @@ int __init acpiphp_glue_init(void)
*/
void acpiphp_glue_exit(void)
{
+ acpiphp_check_host_bridge = NULL;
acpi_pci_unregister_driver(&acpi_pci_hp_driver);
}
===================================================================
@@ -43,6 +43,8 @@ static inline acpi_handle acpi_pci_get_b
}
#endif
+extern void (*acpiphp_check_host_bridge)(acpi_handle handle);
+
#ifdef CONFIG_ACPI_APEI
extern bool aer_acpi_firmware_first(void);
#else