Commit 108029ff authored by Zhao Yakui's avatar Zhao Yakui Committed by Len Brown

ACPI: Add the check of ADR flag in course of finding ACPI handle for PCI device

The _ADR object is used to provide OSPM with the address of one device on its
parent bus. In course of finding ACPI handle for the corresponding PCI device,
we will firstly evaluate the _ADR object and then compare the two addresses to
see whether it is the target ACPI device. But for one PCI device(0000:00:00.0)
under the PCI root bridge, the corresponding address will be constructed as
zero.In such case maybe the ACPI device without _ADR object will be misdetected
and then be used to create the relationship between PCI device and ACPI device.

https://bugzilla.kernel.org/show_bug.cgi?id=16422Signed-off-by: default avatarZhao Yakui <yakui.zhao@intel.com>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent dbbe4649
......@@ -100,7 +100,8 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv)
status = acpi_get_object_info(handle, &info);
if (ACPI_SUCCESS(status)) {
if (info->address == find->address)
if ((info->address == find->address)
&& (info->valid & ACPI_VALID_ADR))
find->handle = handle;
kfree(info);
}
......
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