Received: by 10.223.176.5 with SMTP id f5csp2475098wra; Thu, 1 Feb 2018 00:59:27 -0800 (PST) X-Google-Smtp-Source: AH8x226E3//8hd+Ou2LQChHDQYtiEzxNRLpKtDBwkNv+N3Zu2q1JZutetPYT+sYTA/Ba2eDbBwWY X-Received: by 10.98.178.133 with SMTP id z5mr36144514pfl.88.1517475567602; Thu, 01 Feb 2018 00:59:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517475567; cv=none; d=google.com; s=arc-20160816; b=RTGC4aMRqs7oAPaTN5M2d/HvjMyVZCYQN098ZfOk09vr2I1gihI+WcgEtbfNI3hqt+ ik/Lm7SSAEh5TDJBpY/Sb9WFnvIj0pRqTjogTVxqstxAoHRtfGoXZsht0PG33H1RC6+4 LYVpOzSQmSoUfm04/lu2Y3NWZYIXZcQSovQNoPjDkPUrmpl6t1fq61aidzRjkRanbWqZ Q3x2tW24iHGNmR7kLy8JEAUCr9N3aC63b9V5mNBRLW8fkj+6QSzl97tcNjYtPZAeoyEb y5bQ74pCMJpiKuqkKLTwbTAd+G52H0GXRBKOy/nRYLN25RTg8WWVzpEMufQgdpU4Bsud Gggg== 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=1dbnKkEyW1CUWQWF4M//uXZ+OTMkicwnGtaBCtsyEVA=; b=ljfPkEuRcYZZfzk9MEvDmacF0YsNGmQwJVlk5GUoUuL7Dc9A0H9dVPPvvdXzXV/i6J 361XzyJ1vdtzsMONrm3oj2q2dOHup35udN+iZt0Fg9yY3YZTnb89RehdV/iQzUwfauRm U7NbgzjBC7QJLR95oYfI5XmtpuEU1TMFGrYAYGCfrptU97J0BNMujPYkiFjr9WUHbUpI sQVdf2dBC84nhl3+/63WVe3n4H4U0eEuoAgS/Ooj2aUAgZsoYaZyTjb6gsBpB/lx0TsX nIautNAJZh1na24Oe6eZjuJWmWkc19AowceA/Q2JIvKlGW2bDQp9sdIGs46HV/rMUu0U 4LMw== 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 j13si12611569pgt.279.2018.02.01.00.59.12; Thu, 01 Feb 2018 00:59:27 -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 S1751967AbeBAI53 (ORCPT + 99 others); Thu, 1 Feb 2018 03:57:29 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:39105 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751509AbeBAI5Y (ORCPT ); Thu, 1 Feb 2018 03:57:24 -0500 Received: by mail-wr0-f193.google.com with SMTP id f6so16365939wra.6; Thu, 01 Feb 2018 00:57:24 -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=1dbnKkEyW1CUWQWF4M//uXZ+OTMkicwnGtaBCtsyEVA=; b=gsl/YMRj2SaYO847p/9jHUENyIXOsOWaCmKR2+QDVZcOHmaDY2SWtLMz/TYWiVnKLY aOBDREDnrQ+0jkJJK7k7HgGUnI/FHMNNht/D3EdHot7KafIiSxBJ14pOhY8l4fEGXbvj GZrKjxALfWRrqpGYeLCiwS4UnH9idGYnbVXVcjQ+ybhf2g4wd4/K+VHGS8QkaAFN8CFM oi/G1acfy5wIBmxt6TOVO2jE61wsF3gHX5AkyuOqB+YDU427+oZJK3yMs6gV+xa3y4Fk tG5k1YM22oGM1V9Y6O2FOVZYwIfN9TAqtdqsNV3achmcKglVvZrX61nJH0THQIDCvb/e 2pmw== X-Gm-Message-State: AKwxytemMVzf4Ah4pvXqmWNx/2cqUMJKDaRPXEtFrAKdiGu/EVH1QYTv F1KqwSAy0mBwsJStHq99lB4= X-Received: by 10.223.164.68 with SMTP id e4mr15078674wra.67.1517475443264; Thu, 01 Feb 2018 00:57:23 -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 y145sm1734335wmd.43.2018.02.01.00.57.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Feb 2018 00:57:22 -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 References: <20180129123847.507563674@linuxfoundation.org> <20180129123848.888319573@linuxfoundation.org> From: Jiri Slaby Message-ID: Date: Thu, 1 Feb 2018 09:57:21 +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: 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 02/01/2018, 09:46 AM, Jiri Slaby wrote: > 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? Not only the SHA, the whole commit message is taken from c2a6bbaf0c. But the diff below is fdad4e7a876a2. To clarify: upstream c2a6bbaf0c is in 4.4.80 already (as f4a42f8492). The diff below is a fix for it with upstream SHA fdad4e7a876a2 (in 4.4 as 1fe277d48f). So the code is correct, unlike meta data. >> 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; >> } thanks, -- js suse labs