|
@@ -457,17 +457,18 @@ static void acpiphp_native_scan_bridge(struct pci_dev *bridge)
|
|
/**
|
|
/**
|
|
* enable_slot - enable, configure a slot
|
|
* enable_slot - enable, configure a slot
|
|
* @slot: slot to be enabled
|
|
* @slot: slot to be enabled
|
|
|
|
+ * @bridge: true if enable is for the whole bridge (not a single slot)
|
|
*
|
|
*
|
|
* This function should be called per *physical slot*,
|
|
* This function should be called per *physical slot*,
|
|
* not per each slot object in ACPI namespace.
|
|
* not per each slot object in ACPI namespace.
|
|
*/
|
|
*/
|
|
-static void enable_slot(struct acpiphp_slot *slot)
|
|
|
|
|
|
+static void enable_slot(struct acpiphp_slot *slot, bool bridge)
|
|
{
|
|
{
|
|
struct pci_dev *dev;
|
|
struct pci_dev *dev;
|
|
struct pci_bus *bus = slot->bus;
|
|
struct pci_bus *bus = slot->bus;
|
|
struct acpiphp_func *func;
|
|
struct acpiphp_func *func;
|
|
|
|
|
|
- if (bus->self && hotplug_is_native(bus->self)) {
|
|
|
|
|
|
+ if (bridge && bus->self && hotplug_is_native(bus->self)) {
|
|
/*
|
|
/*
|
|
* If native hotplug is used, it will take care of hotplug
|
|
* If native hotplug is used, it will take care of hotplug
|
|
* slot management and resource allocation for hotplug
|
|
* slot management and resource allocation for hotplug
|
|
@@ -701,7 +702,7 @@ static void acpiphp_check_bridge(struct acpiphp_bridge *bridge)
|
|
trim_stale_devices(dev);
|
|
trim_stale_devices(dev);
|
|
|
|
|
|
/* configure all functions */
|
|
/* configure all functions */
|
|
- enable_slot(slot);
|
|
|
|
|
|
+ enable_slot(slot, true);
|
|
} else {
|
|
} else {
|
|
disable_slot(slot);
|
|
disable_slot(slot);
|
|
}
|
|
}
|
|
@@ -785,7 +786,7 @@ static void hotplug_event(u32 type, struct acpiphp_context *context)
|
|
if (bridge)
|
|
if (bridge)
|
|
acpiphp_check_bridge(bridge);
|
|
acpiphp_check_bridge(bridge);
|
|
else if (!(slot->flags & SLOT_IS_GOING_AWAY))
|
|
else if (!(slot->flags & SLOT_IS_GOING_AWAY))
|
|
- enable_slot(slot);
|
|
|
|
|
|
+ enable_slot(slot, false);
|
|
|
|
|
|
break;
|
|
break;
|
|
|
|
|
|
@@ -973,7 +974,7 @@ int acpiphp_enable_slot(struct acpiphp_slot *slot)
|
|
|
|
|
|
/* configure all functions */
|
|
/* configure all functions */
|
|
if (!(slot->flags & SLOT_ENABLED))
|
|
if (!(slot->flags & SLOT_ENABLED))
|
|
- enable_slot(slot);
|
|
|
|
|
|
+ enable_slot(slot, false);
|
|
|
|
|
|
pci_unlock_rescan_remove();
|
|
pci_unlock_rescan_remove();
|
|
return 0;
|
|
return 0;
|