Skip to content

Commit 108029f

Browse files
yakuizhaolenb
authored andcommitted
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=16422 Signed-off-by: Zhao Yakui <[email protected]> Signed-off-by: Len Brown <[email protected]>
1 parent dbbe464 commit 108029f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/acpi/glue.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,8 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv)
100100

101101
status = acpi_get_object_info(handle, &info);
102102
if (ACPI_SUCCESS(status)) {
103-
if (info->address == find->address)
103+
if ((info->address == find->address)
104+
&& (info->valid & ACPI_VALID_ADR))
104105
find->handle = handle;
105106
kfree(info);
106107
}

0 commit comments

Comments
 (0)