From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mika Westerberg Subject: Re: [PATCH] ACPI / scan: Prefer devices without _HID/_CID for _ADR matching Date: Mon, 2 Jan 2017 12:53:22 +0200 Message-ID: <20170102105322.GG1460@lahna.fi.intel.com> References: <20161225102148.7706-1-hdegoede@redhat.com> <20161229084135.GC1460@lahna.fi.intel.com> <2022116.4lq1KAmrJA@aspire.rjw.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from mga02.intel.com ([134.134.136.20]:31150 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755406AbdABKx1 (ORCPT ); Mon, 2 Jan 2017 05:53:27 -0500 Content-Disposition: inline In-Reply-To: <2022116.4lq1KAmrJA@aspire.rjw.lan> Sender: linux-mmc-owner@vger.kernel.org List-Id: linux-mmc@vger.kernel.org To: "Rafael J. Wysocki" Cc: Hans de Goede , Len Brown , Adrian Hunter , Ulf Hansson , ACPI Devel Maling List , linux-mmc@vger.kernel.org, Andy Shevchenko , Linux PCI On Fri, Dec 30, 2016 at 02:27:31AM +0100, Rafael J. Wysocki wrote: > From: Rafael J. Wysocki > > The way acpi_find_child_device() works currently is that, if there > are two (or more) devices with the same _ADR value in the same > namespace scope (which is not specifically allowed by the spec and > the OS behavior in that case is not defined), the first one of them > found to be present (with the help of _STA) will be returned. > > This covers the majority of cases, but is not sufficient if some of > the devices in question have a _HID (or _CID) returning some valid > ACPI/PNP device IDs (which is disallowed by the spec) and the > ASL writers' expectation appears to be that the OS will match > devices without a valid ACPI/PNP device ID against a given bus > address first. > > To cover this special case as well, modify find_child_checks() > to prefer devices without ACPI/PNP device IDs over devices that > have them. > > Suggested-by: Mika Westerberg > Signed-off-by: Rafael J. Wysocki Thanks for taking care of this Rafael :)