Skip to content

Commit

Permalink
ACPICA: Fixed a problem with AcpiGetDevices where the search of a bra…
Browse files Browse the repository at this point in the history
…nch of the device tree could be terminated prematurely

In accordance with the ACPI specification, the search is terminated
if a device is both not present and not functional (instead of
just not present.) Yakui Zhao.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Bob Moore authored and Len Brown committed Apr 22, 2008
1 parent 8a2e71a commit 549f460
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions drivers/acpi/namespace/nsxfeval.c
Original file line number Diff line number Diff line change
Expand Up @@ -467,10 +467,13 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
return (AE_CTRL_DEPTH);
}

if (!(flags & ACPI_STA_DEVICE_PRESENT)) {

/* Don't examine children of the device if not present */

if (!(flags & ACPI_STA_DEVICE_PRESENT) &&
!(flags & ACPI_STA_DEVICE_FUNCTIONING)) {
/*
* Don't examine the children of the device only when the
* device is neither present nor functional. See ACPI spec,
* description of _STA for more information.
*/
return (AE_CTRL_DEPTH);
}

Expand Down Expand Up @@ -539,7 +542,7 @@ acpi_ns_get_device_callback(acpi_handle obj_handle,
* value is returned to the caller.
*
* This is a wrapper for walk_namespace, but the callback performs
* additional filtering. Please see acpi_get_device_callback.
* additional filtering. Please see acpi_ns_get_device_callback.
*
******************************************************************************/

Expand Down

0 comments on commit 549f460

Please sign in to comment.