Lines 643-648
static void disable_slot(struct acpiphp_
Link Here
|
643 |
slot->flags &= (~SLOT_ENABLED); |
643 |
slot->flags &= (~SLOT_ENABLED); |
644 |
} |
644 |
} |
645 |
|
645 |
|
|
|
646 |
static bool acpiphp_no_hotplug(acpi_handle handle) |
647 |
{ |
648 |
struct acpi_device *adev = NULL; |
649 |
|
650 |
acpi_bus_get_device(handle, &adev); |
651 |
return adev && adev->flags.no_hotplug; |
652 |
} |
653 |
|
654 |
static bool slot_no_hotplug(struct acpiphp_slot *slot) |
655 |
{ |
656 |
struct acpiphp_func *func; |
657 |
|
658 |
list_for_each_entry(func, &slot->funcs, sibling) |
659 |
if (acpiphp_no_hotplug(func_to_handle(func))) |
660 |
return true; |
661 |
|
662 |
return false; |
663 |
} |
646 |
|
664 |
|
647 |
/** |
665 |
/** |
648 |
* get_slot_status - get ACPI slot status |
666 |
* get_slot_status - get ACPI slot status |
Lines 701-707
static void trim_stale_devices(struct pc
Link Here
|
701 |
unsigned long long sta; |
719 |
unsigned long long sta; |
702 |
|
720 |
|
703 |
status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); |
721 |
status = acpi_evaluate_integer(handle, "_STA", NULL, &sta); |
704 |
alive = ACPI_SUCCESS(status) && sta == ACPI_STA_ALL; |
722 |
alive = (ACPI_SUCCESS(status) && sta == ACPI_STA_ALL) |
|
|
723 |
|| acpiphp_no_hotplug(handle); |
705 |
} |
724 |
} |
706 |
if (!alive) { |
725 |
if (!alive) { |
707 |
u32 v; |
726 |
u32 v; |
Lines 741-748
static void acpiphp_check_bridge(struct
Link Here
|
741 |
struct pci_dev *dev, *tmp; |
760 |
struct pci_dev *dev, *tmp; |
742 |
|
761 |
|
743 |
mutex_lock(&slot->crit_sect); |
762 |
mutex_lock(&slot->crit_sect); |
744 |
/* wake up all functions */ |
763 |
if (slot_no_hotplug(slot)) { |
745 |
if (get_slot_status(slot) == ACPI_STA_ALL) { |
764 |
; /* do nothing */ |
|
|
765 |
} else if (get_slot_status(slot) == ACPI_STA_ALL) { |
746 |
/* remove stale devices if any */ |
766 |
/* remove stale devices if any */ |
747 |
list_for_each_entry_safe(dev, tmp, &bus->devices, |
767 |
list_for_each_entry_safe(dev, tmp, &bus->devices, |
748 |
bus_list) |
768 |
bus_list) |