diff options
author | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2014-01-10 15:24:41 +0100 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2014-01-14 20:14:25 +0100 |
commit | 9217a984671e8a7e38f1822eba754898066e2ae1 (patch) | |
tree | b176cec1b70bbf1cbb07b361d86ff5c4ed312017 /drivers/pci/hotplug/acpiphp.h | |
parent | ACPI / PCI: Use global PCI rescan-remove locking in PCI root hotplug (diff) | |
download | linux-9217a984671e8a7e38f1822eba754898066e2ae1.tar.xz linux-9217a984671e8a7e38f1822eba754898066e2ae1.zip |
ACPI / hotplug / PCI: Use global PCI rescan-remove locking
Multiple race conditions are possible between the ACPI-based PCI hotplug
(ACPIPHP) and the generic PCI bus rescan and device removal that can be
triggered via sysfs.
To avoid those race conditions make the ACPIPHP code use global PCI
rescan-remove locking.
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Diffstat (limited to 'drivers/pci/hotplug/acpiphp.h')
-rw-r--r-- | drivers/pci/hotplug/acpiphp.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/pci/hotplug/acpiphp.h b/drivers/pci/hotplug/acpiphp.h index 1592dbe4f904..b6162be4df40 100644 --- a/drivers/pci/hotplug/acpiphp.h +++ b/drivers/pci/hotplug/acpiphp.h @@ -77,6 +77,8 @@ struct acpiphp_bridge { /* PCI-to-PCI bridge device */ struct pci_dev *pci_dev; + + bool is_going_away; }; @@ -150,6 +152,7 @@ struct acpiphp_attention_info /* slot flags */ #define SLOT_ENABLED (0x00000001) +#define SLOT_IS_GOING_AWAY (0x00000002) /* function flags */ @@ -169,7 +172,7 @@ void acpiphp_unregister_hotplug_slot(struct acpiphp_slot *slot); typedef int (*acpiphp_callback)(struct acpiphp_slot *slot, void *data); int acpiphp_enable_slot(struct acpiphp_slot *slot); -int acpiphp_disable_and_eject_slot(struct acpiphp_slot *slot); +int acpiphp_disable_slot(struct acpiphp_slot *slot); u8 acpiphp_get_power_status(struct acpiphp_slot *slot); u8 acpiphp_get_attention_status(struct acpiphp_slot *slot); u8 acpiphp_get_latch_status(struct acpiphp_slot *slot); |