Skip to content

Commit

Permalink
PCI/ACPI: Remove unnecessary _OSC evaluation for control request
Browse files Browse the repository at this point in the history
If a control had already been granted, we don't need to re-evaluate
_OSC for it because firmware may not reject control of any feature it
has previously granted control to.

Reviewed-by: Andrew Patterson <andrew.patterson@hp.com>
Tested-by: Andrew Patterson <andrew.patterson@hp.com>
Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
  • Loading branch information
Taku Izumi authored and Jesse Barnes committed Jan 7, 2009
1 parent 753e3ac commit e0fa3b4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/pci/pci-acpi.c
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,10 @@ acpi_status pci_osc_control_set(acpi_handle handle, u32 flags)
goto out;
}

/* No need to evaluate _OSC if the control was already granted. */
if ((osc_data->control_set & ctrlset) == ctrlset)
goto out;

if (!osc_data->is_queried) {
status = __acpi_query_osc(osc_data->support_set, osc_data);
if (ACPI_FAILURE(status))
Expand Down

0 comments on commit e0fa3b4

Please sign in to comment.