Merge branch 'acpi-pci-hotplug' into acpi-hotplug
Conflicts: include/acpi/acpi_bus.h
This commit is contained in:
@@ -645,6 +645,24 @@ static void disable_slot(struct acpiphp_slot *slot)
|
||||
slot->flags &= (~SLOT_ENABLED);
|
||||
}
|
||||
|
||||
static bool acpiphp_no_hotplug(acpi_handle handle)
|
||||
{
|
||||
struct acpi_device *adev = NULL;
|
||||
|
||||
acpi_bus_get_device(handle, &adev);
|
||||
return adev && adev->flags.no_hotplug;
|
||||
}
|
||||
|
||||
static bool slot_no_hotplug(struct acpiphp_slot *slot)
|
||||
{
|
||||
struct acpiphp_func *func;
|
||||
|
||||
list_for_each_entry(func, &slot->funcs, sibling)
|
||||
if (acpiphp_no_hotplug(func_to_handle(func)))
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* get_slot_status - get ACPI slot status
|
||||
@@ -703,7 +721,8 @@ static void trim_stale_devices(struct pci_dev *dev)
|
||||
unsigned long long sta;
|
||||
|
||||
status = acpi_evaluate_integer(handle, "_STA", NULL, &sta);
|
||||
alive = ACPI_SUCCESS(status) && sta == ACPI_STA_ALL;
|
||||
alive = (ACPI_SUCCESS(status) && sta == ACPI_STA_ALL)
|
||||
|| acpiphp_no_hotplug(handle);
|
||||
}
|
||||
if (!alive) {
|
||||
u32 v;
|
||||
@@ -743,8 +762,9 @@ static void acpiphp_check_bridge(struct acpiphp_bridge *bridge)
|
||||
struct pci_dev *dev, *tmp;
|
||||
|
||||
mutex_lock(&slot->crit_sect);
|
||||
/* wake up all functions */
|
||||
if (get_slot_status(slot) == ACPI_STA_ALL) {
|
||||
if (slot_no_hotplug(slot)) {
|
||||
; /* do nothing */
|
||||
} else if (get_slot_status(slot) == ACPI_STA_ALL) {
|
||||
/* remove stale devices if any */
|
||||
list_for_each_entry_safe(dev, tmp, &bus->devices,
|
||||
bus_list)
|
||||
|
Reference in New Issue
Block a user