lkml.org 
[lkml]   [2021]   [Oct]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH v1 2/2] ACPI: scan: Do not set type.bus_address if _HID is valid
Date
From: Rafael J. Wysocki <rafael.j.wysocki@intel.com>

According to Section 6.1 of ACPI 6.4, it is invalid to provide both
_HID and _ADR for one device at the same time, so modify the code to
set pnp.type.bus_address and pnp.bus_address for a device only if it
has _ADR, but it doesn't have a valid _HID.

Link: https://uefi.org/specs/ACPI/6.4/06_Device_Configuration/Device_Configuration.html#device-identification-objects
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
---
drivers/acpi/scan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Index: linux-pm/drivers/acpi/scan.c
===================================================================
--- linux-pm.orig/drivers/acpi/scan.c
+++ linux-pm/drivers/acpi/scan.c
@@ -1343,11 +1343,11 @@ static void acpi_set_pnp_ids(acpi_handle
for (i = 0; i < cid_list->count; i++)
acpi_add_id(pnp, cid_list->ids[i].string);
}
- }
- if (info->valid & ACPI_VALID_ADR) {
+ } else if (info->valid & ACPI_VALID_ADR) {
pnp->bus_address = info->address;
pnp->type.bus_address = 1;
}
+
if (info->valid & ACPI_VALID_UID)
pnp->unique_id = kstrdup(info->unique_id.string,
GFP_KERNEL);


\
 
 \ /
  Last update: 2021-10-26 21:01    [W:0.058 / U:0.696 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site