aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/pci/hotplug/pciehprm_acpi.c
diff options
context:
space:
mode:
authorrajesh.shah@intel.com <rajesh.shah@intel.com>2005-10-31 19:20:11 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2005-11-10 19:09:15 -0500
commit427bf532b5ad6db5addc2bce675d13f874397c0c (patch)
tree3a099b05ab3b1252d6e441855d9b1da02e0daf8c /drivers/pci/hotplug/pciehprm_acpi.c
parent1a9ed1bfe2fb17cc30227a12a3c1212128bb78b6 (diff)
[PATCH] pciehp: request control of each hotplug controller individually
This patch tweaks the way pciehp requests control of the hotplug hardware from BIOS. It now tries to invoke the ACPI _OSC method for a specific hotplug controller only, rather than walking the entire acpi namespace invoking all possible _OSC methods under all host bridges. This allows us to gain control of each hotplug controller individually, even if BIOS fails to give us control of some other hotplug controller in the system. Signed-off-by: Rajesh Shah <rajesh.shah@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/pci/hotplug/pciehprm_acpi.c')
-rw-r--r--drivers/pci/hotplug/pciehprm_acpi.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/pci/hotplug/pciehprm_acpi.c b/drivers/pci/hotplug/pciehprm_acpi.c
index 5d184582331e..5acdae3d52b1 100644
--- a/drivers/pci/hotplug/pciehprm_acpi.c
+++ b/drivers/pci/hotplug/pciehprm_acpi.c
@@ -143,12 +143,13 @@ static acpi_status acpi_run_oshp(acpi_handle handle)
143int get_hp_hw_control_from_firmware(struct pci_dev *dev) 143int get_hp_hw_control_from_firmware(struct pci_dev *dev)
144{ 144{
145 acpi_status status; 145 acpi_status status;
146 acpi_handle handle = DEVICE_ACPI_HANDLE(&(dev->dev));
146 /* 147 /*
147 * Per PCI firmware specification, we should run the ACPI _OSC 148 * Per PCI firmware specification, we should run the ACPI _OSC
148 * method to get control of hotplug hardware before using it 149 * method to get control of hotplug hardware before using it
149 */ 150 */
150 /* Fixme: run _OSC for a specific host bridge, not all of them */ 151 status = pci_osc_control_set(handle,
151 status = pci_osc_control_set(OSC_PCI_EXPRESS_NATIVE_HP_CONTROL); 152 OSC_PCI_EXPRESS_NATIVE_HP_CONTROL);
152 153
153 /* Fixme: fail native hotplug if _OSC does not exist for root ports */ 154 /* Fixme: fail native hotplug if _OSC does not exist for root ports */
154 if (status == AE_NOT_FOUND) { 155 if (status == AE_NOT_FOUND) {
@@ -156,9 +157,7 @@ int get_hp_hw_control_from_firmware(struct pci_dev *dev)
156 * Some older BIOS's don't support _OSC but support 157 * Some older BIOS's don't support _OSC but support
157 * OSHP to do the same thing 158 * OSHP to do the same thing
158 */ 159 */
159 acpi_handle handle = DEVICE_ACPI_HANDLE(&(dev->dev)); 160 status = acpi_run_oshp(handle);
160 if (handle)
161 status = acpi_run_oshp(handle);
162 } 161 }
163 if (ACPI_FAILURE(status)) { 162 if (ACPI_FAILURE(status)) {
164 err("Cannot get control of hotplug hardware\n"); 163 err("Cannot get control of hotplug hardware\n");