Received: by 10.223.176.5 with SMTP id f5csp2466561wra; Thu, 1 Feb 2018 00:47:53 -0800 (PST) X-Google-Smtp-Source: AH8x226nDs1oeaMCWfTQX8LwwV2bqxO4R0UHk9kCQAXC8k0AamDIhiiBP2BhBSdSNlyfNfMJBLP6 X-Received: by 10.99.111.11 with SMTP id k11mr28183200pgc.414.1517474873794; Thu, 01 Feb 2018 00:47:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517474873; cv=none; d=google.com; s=arc-20160816; b=ekTRCXUQ4rXWGsvXtb6gszMKO6BHvjQtYSRhI72LRal4MIIQ6XkjiQh07LCkDPoz5U 4SKzK9Nm+2a0bsz4Emho36/IWj3rhXTIcn6vZa1n8BJ04rjbcBuncP22RSUhKCLu1Jga XuT8cjV7surEEwVbYRz8UnUhNE6yVD/x/8KGmG15Oj0jszy7HnuqQ0mQqyHY+bJq5Gyr LO4kD8UmHaUgq8IojFG/t0gnSvB5YE6FuiOQh1ZJlQI9a4XpQt6S5DUILehBxAxKa1AI ijkmE0v5OGSqXCbPPk9hCUs0BBthB4V1rj0bxSIDHBzs5nX4fVm1RLRPSK8OJ1+VjG+K bXiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=eM9J2o3CfACZsjKi/MrRR88lallw/n5BG9ljgNdCEhs=; b=m4gr4A2VtaNGSoDksnAbLLOcuHV4Wv9ibWWpbitiSuBQ3YOsUN8kSm02nojvJj7tNj EarNagJsUNm2Ui7Zv8rUbNYM/PhhtYBe0kOAbDKCyLCMoZevZZgEcOdOqGoNjYwZbXUK WMGJ1Ahh8aw32H0XssOcUWY47appyI3myamGlRXelZCKX6C5dnDpIF0bheA8DELe33cV Dp+XC/qE6/etJb9hBbn2Udx8ZdhpllSScH9IfL2T9GpNUmOMKIMNSets+xJL/QyZ/uFr FZUrjYGS08UK3wMJzLbvz8yV9FhKof0wodLr3pDNyhxTTiLqA5/pRfv8S8EiU0DhhWeW X38Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w31-v6si4986647pla.402.2018.02.01.00.47.39; Thu, 01 Feb 2018 00:47:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751923AbeBAIqm (ORCPT + 99 others); Thu, 1 Feb 2018 03:46:42 -0500 Received: from mail-wm0-f67.google.com ([74.125.82.67]:37961 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751423AbeBAIql (ORCPT ); Thu, 1 Feb 2018 03:46:41 -0500 Received: by mail-wm0-f67.google.com with SMTP id 141so4022151wme.3; Thu, 01 Feb 2018 00:46:40 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=eM9J2o3CfACZsjKi/MrRR88lallw/n5BG9ljgNdCEhs=; b=o7fokorxFXtfVCxwDsbB0w9NZ3s/c8bye785mEfGcfhoU/adH0QyFpt/9+PoGbXNMC UXLhUuzksRx9ztKWVCKil/VE687mXebkzz9RTVA+K/XlV3tFRCwgg64H/tCZJ7DpPdaS 1Bd/u+bW9zdbOw2Gk9Tb+WK+b1myklrEpDnFzvCEs9GFrWbY129JBZd0PwUzNLMl+lj0 8jeEJAxmW7XGuhAOL278C3ZyXDdi98JslnPJkDDb2l0pTStQdj2f1uDUAKDD8UJX4Vqi S7VAJOKOicUJpTFsNMgbfMcTDEQd/VzFyR3nfAtlQvO3BfylnSx6BVS3bV0oPAQP0jhY 6HFA== X-Gm-Message-State: AKwxytd1R4SQUprzILneUw6ONlP8CmP+TIg1tInjdI6SJsyeO/J88Bm+ +rigaTMwETLoZYqS5vGV8i0= X-Received: by 10.28.199.132 with SMTP id x126mr355892wmf.71.1517474799839; Thu, 01 Feb 2018 00:46:39 -0800 (PST) Received: from ?IPv6:2a01:4240:2e27:ad85:aaaa::19f? (f.9.1.0.0.0.0.0.0.0.0.0.a.a.a.a.5.8.d.a.7.2.e.2.0.4.2.4.1.0.a.2.v6.cust.nbox.cz. [2a01:4240:2e27:ad85:aaaa::19f]) by smtp.gmail.com with ESMTPSA id f9sm1691315wmf.12.2018.02.01.00.46.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2018 00:46:38 -0800 (PST) Subject: Re: [PATCH 4.4 28/74] ACPI / scan: Prefer devices without _HID/_CID for _ADR matching To: Greg Kroah-Hartman , linux-kernel@vger.kernel.org Cc: stable@vger.kernel.org, Mika Westerberg , "Rafael J. Wysocki" , Hans de Goede , Jiri Slaby References: <20180129123847.507563674@linuxfoundation.org> <20180129123848.888319573@linuxfoundation.org> From: Jiri Slaby Message-ID: Date: Thu, 1 Feb 2018 09:46:38 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.2 MIME-Version: 1.0 In-Reply-To: <20180129123848.888319573@linuxfoundation.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-GB Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01/29/2018, 01:56 PM, Greg Kroah-Hartman wrote: > 4.4-stable review patch. If anyone has any objections, please let me know. > > ------------------ > > From: Rafael J. Wysocki > > commit c2a6bbaf0c5f90463a7011a295bbdb7e33c80b51 upstream. > > 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 > Tested-by: Hans de Goede > Signed-off-by: Jiri Slaby You seem you took this from SLE12-SP2? But where did you take the upstream commit SHA from? In SLE, I have "Git-commit: fdad4e7a876a2..." which is the correct SHA of this patch. The above c2a6bbaf0c is a different patch. So are your scripts broken or is this a manual oversight? > Signed-off-by: Greg Kroah-Hartman > > --- > drivers/acpi/glue.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > --- a/drivers/acpi/glue.c > +++ b/drivers/acpi/glue.c > @@ -99,13 +99,13 @@ static int find_child_checks(struct acpi > return -ENODEV; > > /* > - * If the device has a _HID (or _CID) returning a valid ACPI/PNP > - * device ID, it is better to make it look less attractive here, so that > - * the other device with the same _ADR value (that may not have a valid > - * device ID) can be matched going forward. [This means a second spec > - * violation in a row, so whatever we do here is best effort anyway.] > + * If the device has a _HID returning a valid ACPI/PNP device ID, it is > + * better to make it look less attractive here, so that the other device > + * with the same _ADR value (that may not have a valid device ID) can be > + * matched going forward. [This means a second spec violation in a row, > + * so whatever we do here is best effort anyway.] > */ > - return sta_present && list_empty(&adev->pnp.ids) ? > + return sta_present && !adev->pnp.type.platform_id ? > FIND_CHILD_MAX_SCORE : FIND_CHILD_MIN_SCORE; > } > > > -- js suse labs