On Friday, March 31, 2017 12:39:35 PM Hans de Goede wrote: > Hi, > > On 30-03-17 22:56, Rafael J. Wysocki wrote: > > On Sunday, January 01, 2017 09:30:06 PM Hans de Goede wrote: > >> Hi, > >> > >> On 30-12-16 02:27, Rafael J. Wysocki wrote: > >>> From: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> > >>> > >>> 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 <mika.westerberg@xxxxxxxxxxxxxxx> > >>> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@xxxxxxxxx> > >>> --- > >>> > >>> I'm not actually sure if this is sufficient to fix the original 80860F14 uid "2" > >>> sd-controller problem on CherryTrail. Hans, can you please check? > >> > >> Ok, just booted a kernel with this patch replacing my own attempt > >> at fixing this, and the kernel still sees and initializes the > >> mmc controller in question correctly with this patch: > >> > >> Tested-by: Hans de Goede <hdegoede@xxxxxxxxxx> > > > > Unfortunately, this breaks discrete graphics enumeration in > > > > https://bugzilla.kernel.org/show_bug.cgi?id=194889 > > > > so can you please check if the patch below doesn't break the platform fixed by > > the above? > > I've just tried this and this patch does not regress the platform fixed > by the original commit. OK, thanks!