Commit 9b536e0b authored by Kenji Kaneshige's avatar Kenji Kaneshige Committed by Jesse Barnes

PCI hotplug: fix oshp evaluation

If firmware doesn't grant over native hotplug control through ACPI
_OSC method, we must not evaluate OSHP.
Acked-by: default avatarAndrew Patterson <andrew.patterson@hp.com>
Signed-off-by: default avatarKenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@virtuousgeek.org>
parent e0cd5160
...@@ -362,6 +362,8 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev, u32 flags) ...@@ -362,6 +362,8 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev, u32 flags)
status = acpi_pci_osc_control_set(handle, flags); status = acpi_pci_osc_control_set(handle, flags);
if (ACPI_SUCCESS(status)) if (ACPI_SUCCESS(status))
goto got_one; goto got_one;
if (status == AE_SUPPORT)
goto no_control;
kfree(string.pointer); kfree(string.pointer);
string = (struct acpi_buffer){ ACPI_ALLOCATE_BUFFER, NULL }; string = (struct acpi_buffer){ ACPI_ALLOCATE_BUFFER, NULL };
} }
...@@ -394,10 +396,9 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev, u32 flags) ...@@ -394,10 +396,9 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *pdev, u32 flags)
if (ACPI_FAILURE(status)) if (ACPI_FAILURE(status))
break; break;
} }
no_control:
dbg("Cannot get control of hotplug hardware for pci %s\n", dbg("Cannot get control of hotplug hardware for pci %s\n",
pci_name(pdev)); pci_name(pdev));
kfree(string.pointer); kfree(string.pointer);
return -ENODEV; return -ENODEV;
got_one: got_one:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment