From: yakui.zhao@intel.com
To: lenb@kernel.org
Cc: linux-acpi@vger.kernel.org, Zhao Yakui <yakui.zhao@intel.com>
Subject: [PATCH] ACPI: Add the check of ADR flag in course of finding ACPI handle for PCI device
Date: Tue, 13 Jul 2010 11:36:08 +0800 [thread overview]
Message-ID: <1278992168-7457-1-git-send-email-yakui.zhao@intel.com> (raw)
From: Zhao Yakui <yakui.zhao@intel.com>
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.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
---
drivers/acpi/glue.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c
index 4af6301..78b0164 100644
--- a/drivers/acpi/glue.c
+++ b/drivers/acpi/glue.c
@@ -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);
}
--
1.5.4.5
next reply other threads:[~2010-07-13 3:42 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-07-13 3:36 yakui.zhao [this message]
2010-07-21 2:15 ` [PATCH] ACPI: Add the check of ADR flag in course of finding ACPI handle for PCI device ykzhao
2010-07-27 2:33 ` Len Brown
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1278992168-7457-1-git-send-email-yakui.zhao@intel.com \
--to=yakui.zhao@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox