commit 9e52bf0d727211d60a3b176056ae61666bf24d21 (HEAD -> master) Author: Naveen Kumar Parna Date: Tue Feb 25 12:18:35 2025 +0530 added more debug logs in hotplug_event() diff --git a/drivers/pci/hotplug/acpiphp_glue.c b/drivers/pci/hotplug/acpiphp_glue.c index 5b1f271c6..d2ab041bc 100644 --- a/drivers/pci/hotplug/acpiphp_glue.c +++ b/drivers/pci/hotplug/acpiphp_glue.c @@ -789,8 +789,10 @@ static void hotplug_event(u32 type, struct acpiphp_context *context) acpi_lock_hp_context(); bridge = context->bridge; - if (bridge) + if (bridge) { get_bridge(bridge); + acpi_handle_debug(handle, "Bridge acquired in %s()\n", __func__); + } acpi_unlock_hp_context(); @@ -800,10 +802,13 @@ static void hotplug_event(u32 type, struct acpiphp_context *context) case ACPI_NOTIFY_BUS_CHECK: /* bus re-enumerate */ acpi_handle_debug(handle, "Bus check in %s()\n", __func__); - if (bridge) + if (bridge) { + acpi_handle_debug(handle, "Checking bridge in %s()\n", __func__); acpiphp_check_bridge(bridge); - else if (!(slot->flags & SLOT_IS_GOING_AWAY)) + } else if (!(slot->flags & SLOT_IS_GOING_AWAY)) { + acpi_handle_debug(handle, "Enabling slot in %s()\n", __func__); enable_slot(slot, false); + } break; @@ -811,14 +816,18 @@ static void hotplug_event(u32 type, struct acpiphp_context *context) /* device check */ acpi_handle_debug(handle, "Device check in %s()\n", __func__); if (bridge) { + acpi_handle_debug(handle, "Checking bridge in %s()\n", __func__); acpiphp_check_bridge(bridge); } else if (!(slot->flags & SLOT_IS_GOING_AWAY)) { + acpi_handle_debug(handle, "Rescanning slot in %s()\n", __func__); /* * Check if anything has changed in the slot and rescan * from the parent if that's the case. */ - if (acpiphp_rescan_slot(slot)) + if (acpiphp_rescan_slot(slot)) { + acpi_handle_debug(handle, "Checking parent bridge in %s()\n", __func__); acpiphp_check_bridge(func->parent); + } } break; @@ -830,8 +839,10 @@ static void hotplug_event(u32 type, struct acpiphp_context *context) } pci_unlock_rescan_remove(); - if (bridge) + if (bridge) { + acpi_handle_debug(handle, "Releasing bridge in %s()\n", __func__); put_bridge(bridge); + } } static int acpiphp_hotplug_notify(struct acpi_device *adev, u32 type)