===================================================================
@@ -35,7 +35,7 @@ int pcie_port_acpi_setup(struct pci_dev
{
acpi_status status;
acpi_handle handle;
- u32 flags;
+ u32 flags, prev_flags = 0;
if (acpi_pci_disabled)
return 0;
@@ -55,11 +55,14 @@ int pcie_port_acpi_setup(struct pci_dev
flags |= OSC_PCI_EXPRESS_AER_CONTROL;
}
- status = acpi_pci_osc_control_query(handle, &flags);
- if (ACPI_FAILURE(status)) {
- dev_dbg(&port->dev, "ACPI _OSC query failed (code %d)\n",
- status);
- return -ENODEV;
+ while (flags != prev_flags) {
+ prev_flags = flags;
+ status = acpi_pci_osc_control_query(handle, &flags);
+ if (ACPI_FAILURE(status)) {
+ dev_dbg(&port->dev,
+ "ACPI _OSC query failed (code %d)\n", status);
+ return -ENODEV;
+ }
}
if (!(flags & OSC_PCI_EXPRESS_CAP_STRUCTURE_CONTROL)) {