Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp170893pxb; Wed, 27 Oct 2021 00:20:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8uucC0TsGv4grrf7mL84rxsi6newlrxwym2vbX1hfyNwTILiX4Ctk3kr7awacPOGrggl3 X-Received: by 2002:aa7:9dcd:0:b0:47c:a92:31b5 with SMTP id g13-20020aa79dcd000000b0047c0a9231b5mr11707055pfq.17.1635319236289; Wed, 27 Oct 2021 00:20:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635319236; cv=none; d=google.com; s=arc-20160816; b=h7bm0Amd9KKEdgRL02D3qcngCS7mZ/4JtrKztPeo+bkMyHLf7FXVh9HtIMMFkmJuB0 i/oZ5Y/1nSNozEX8f8uqzQSmkJgA8kOGCh+PwBkqu7vEvLXmmBgVbcOOH4CGElixqxi1 PtzPCub19ub6uAnl2Rb9nWK9O2H3WO2791Mk3z6EsmQGIPFLEWVMHt0i4TeLSpyfl9sU ksJWOOGpHC/LTqJeNu3Skx37SDxD/REUCtpOrtTqtXUukhEplOJ9/KAoDLzCithImKmL eOHmMhIKw9/guqO3g1M98KgWNOCEMGGmLc/BHQQC6QjoIGTOhHgLyvUirG+Zc0qV6seT gyyA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=fkVdFytEXAQ33e9fSJzMSBPm5qlMGrRE0qfiEvNacBw=; b=nuNDWg3U6k0LSEdGFmJz/mrFbj9Nz9eBgX3eoZPCFI7M1g+nBtjlqVmXLMHKoAeajc drOEuxW9csge8HngJfkFe4D/oJmIGsx5dL9sHMDi8Iv74bMSvT8bPSEhQ8Z6MNR+afnX nWi3qR1S7H1eN76Pwg/XGKqhVa1u8Jw/zOApDPWKeAHwrbka3RSKMZZ3d5AtPxsQShtm RWO+erp9oiPCkabbDsjXg+gwr45tRUzlCX0tR5N5RCgSUuW2vysNlXin/ChpEALLfa0V 1Nk+Like8VHKR0DvLsVt9TMw/+1iDkhhQJdrHRj860cHfQen7tuzN7tNJ4BHyRQdWv+h 07RQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t4si23036834pgv.143.2021.10.27.00.19.59; Wed, 27 Oct 2021 00:20:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238451AbhJZTCz (ORCPT + 99 others); Tue, 26 Oct 2021 15:02:55 -0400 Received: from cloudserver094114.home.pl ([79.96.170.134]:60386 "EHLO cloudserver094114.home.pl" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238449AbhJZTCs (ORCPT ); Tue, 26 Oct 2021 15:02:48 -0400 Received: from localhost (127.0.0.1) (HELO v370.home.net.pl) by /usr/run/smtp (/usr/run/postfix/private/idea_relay_lmtp) via UNIX with SMTP (IdeaSmtpServer 3.0.0) id a2ba91e1d231c4e5; Tue, 26 Oct 2021 21:00:16 +0200 Received: from kreacher.localnet (unknown [213.134.187.81]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by v370.home.net.pl (Postfix) with ESMTPSA id 7B54D66A9F8; Tue, 26 Oct 2021 21:00:15 +0200 (CEST) From: "Rafael J. Wysocki" To: Linux ACPI Cc: Andy Shevchenko , Hans de Goede , LKML , Mika Westerberg Subject: [PATCH v1 2/2] ACPI: scan: Do not set type.bus_address if _HID is valid Date: Tue, 26 Oct 2021 21:00:03 +0200 Message-ID: <2223516.ElGaqSPkdT@kreacher> In-Reply-To: <11860508.O9o76ZdvQC@kreacher> References: <11860508.O9o76ZdvQC@kreacher> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="UTF-8" X-CLIENT-IP: 213.134.187.81 X-CLIENT-HOSTNAME: 213.134.187.81 X-VADE-SPAMSTATE: clean X-VADE-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedvtddrudeljedgleelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecujffqoffgrffnpdggtffipffknecuuegrihhlohhuthemucduhedtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenucfjughrpefhvffufffkjghfggfgtgesthfuredttddtjeenucfhrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqeenucggtffrrghtthgvrhhnpeetffeugeduleegieeklefffedtteetvdekvddtieejueffgeehveetudehjeffieenucffohhmrghinhepuhgvfhhirdhorhhgnecukfhppedvudefrddufeegrddukeejrdekudenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpedvudefrddufeegrddukeejrdekuddphhgvlhhopehkrhgvrggthhgvrhdrlhhotggrlhhnvghtpdhmrghilhhfrhhomhepfdftrghfrggvlhculfdrucghhihsohgtkhhifdcuoehrjhifsehrjhifhihsohgtkhhirdhnvghtqedprhgtphhtthhopehlihhnuhigqdgrtghpihesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopegrnhgurhhihidrshhhvghvtghhvghnkhhosehlihhnuhigrdhinhhtvghlrdgtohhmpdhrtghpthhtohephhguvghgohgvuggvsehrvgguhhgrthdrtghomhdprhgtphhtthhopehlihhnuhigqdhkvghrnhgvlhesvhhgvghrrdhkvghrnhgv lhdrohhrghdprhgtphhtthhopehmihhkrgdrfigvshhtvghrsggvrhhgsehlihhnuhigrdhinhhtvghlrdgtohhm X-DCC--Metrics: v370.home.net.pl 1024; Body=10 Fuz1=10 Fuz2=10 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Rafael J. Wysocki 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 --- 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);