From patchwork Sat Oct 22 07:27:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7537 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1105865wrr; Sat, 22 Oct 2022 01:36:22 -0700 (PDT) X-Google-Smtp-Source: AMsMyM73mx0ZZhqNzJCyShndynoLoAVZKAWuddK9eMqvVzsBHR5l9iMm2w8cNdKJCsQS/s89tXBI X-Received: by 2002:a63:5a63:0:b0:42f:e143:80d4 with SMTP id k35-20020a635a63000000b0042fe14380d4mr19961723pgm.456.1666427782677; Sat, 22 Oct 2022 01:36:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666427782; cv=none; d=google.com; s=arc-20160816; b=IGsFgJZhtzbXhaJeqEjU5F6IVcRChdKzLpBAlgRe8IRMKZVdZy4z42unFqgQ+i1nDE kzsTDwO5ydqsvL/2VZstN55UhPlMcy/9zCsTqhgVoC7vph6OGLLnBGJERkSVQPYJksXw mND79d5dXPEV81CWkJwx2v1i3rQd5vN27sRUPQFQW57+byVo/hH+nrRVY6/vw3PRDYCS JqBjtop4Zq3zWQ0EwAGly4cuYrCZYdRvm5AKj7HeXx5i7b3Y9tf4VbHW4mxVl8q5RJ1H 0+sM+XesBRBK+gKFaqE1ohYtGhLBZH2nXrs9k4HU5ygauEBUVo85BBrfuRJ+SNtxLEm6 yJbA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=UBym0VXSnLeYoMgTFdL3ZmoKoU+5/HKxdD3hjJz0Diw=; b=te4+gXeezfwkaM95XdI4dtxV+OVhhSTu8VyxKuZ7WN4tU/3cS2nPIL1YxcvgYnhIBh 1HAamGrwIkXBbH/qrtPx91S+fN9UGgFzE8qK+1vJn+df+K5ToqP41lOWLFoQb6BQTT7q rMZAqQOBePSRN+riaiGS+orw3ljDY0jEi2kZcxK2ugh+bFj8S4AYJ0OMU3kIfd+FUjbZ Smn+SRfXv9UOW68T/fVTIc0+MOIi/oqiQ/sGxwY37j4lPxuiN0LZVp6XKHfQkQ2dWA/3 92YC6SLjJjEcWYDbX2HY3cp601rddVljd9ZS+vIHWKduIFnqS2/lxlN+OB+kGOOUbXPo 1GiA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rrp6h9ll; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m18-20020a056a00081200b00565de49c28esi30533015pfk.57.2022.10.22.01.36.08; Sat, 22 Oct 2022 01:36:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=rrp6h9ll; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233785AbiJVI0I (ORCPT + 99 others); Sat, 22 Oct 2022 04:26:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34070 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233989AbiJVIYa (ORCPT ); Sat, 22 Oct 2022 04:24:30 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8B44C57564; Sat, 22 Oct 2022 01:00:00 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EAE18B82E16; Sat, 22 Oct 2022 07:59:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6055EC433C1; Sat, 22 Oct 2022 07:59:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425598; bh=psaJ9l6m2dT3AwTJ14Cd2vhLcC+Ys2U7Ajn7QpIyigg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rrp6h9llEbUoVuRReZ+qtj/Qx5SUMbOUQbs4fGRk+b9skgEfKBCC5rGOpwUwKQ2DB 1qyVZu52h32Og5pP/i4pJI/p3DBhEoIccIkj3xJKdgoPYwxe2J33DZ7J3Vjcf5csUv ms+2DFC3nqS8irjeZ1fxEZ1sjJlZdaxUkdhco1bU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Mario Limonciello , Hans de Goede , "Rafael J. Wysocki" , Sasha Levin , Luya Tshimbalanga Subject: [PATCH 5.19 552/717] ACPI: x86: Add a quirk for Dell Inspiron 14 2-in-1 for StorageD3Enable Date: Sat, 22 Oct 2022 09:27:11 +0200 Message-Id: <20221022072522.791506800@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747376179163141163?= X-GMAIL-MSGID: =?utf-8?q?1747376179163141163?= From: Mario Limonciello [ Upstream commit 018d6711c26e4bd26e20a819fcc7f8ab902608f3 ] Dell Inspiron 14 2-in-1 has two ACPI nodes under GPP1 both with _ADR of 0, both without _HID. It's ambiguous which the kernel should take, but it seems to take "DEV0". Unfortunately "DEV0" is missing the device property `StorageD3Enable` which is present on "NVME". To avoid this causing problems for suspend, add a quirk for this system to behave like `StorageD3Enable` property was found. Link: https://bugzilla.kernel.org/show_bug.cgi?id=216440 Reported-and-tested-by: Luya Tshimbalanga Signed-off-by: Mario Limonciello Reviewed-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/x86/utils.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c index 664070fc8349..d7cdd8406c84 100644 --- a/drivers/acpi/x86/utils.c +++ b/drivers/acpi/x86/utils.c @@ -207,9 +207,26 @@ static const struct x86_cpu_id storage_d3_cpu_ids[] = { {} }; +static const struct dmi_system_id force_storage_d3_dmi[] = { + { + /* + * _ADR is ambiguous between GPP1.DEV0 and GPP1.NVME + * but .NVME is needed to get StorageD3Enable node + * https://bugzilla.kernel.org/show_bug.cgi?id=216440 + */ + .matches = { + DMI_MATCH(DMI_SYS_VENDOR, "Dell Inc."), + DMI_MATCH(DMI_PRODUCT_NAME, "Inspiron 14 7425 2-in-1"), + } + }, + {} +}; + bool force_storage_d3(void) { - return x86_match_cpu(storage_d3_cpu_ids); + const struct dmi_system_id *dmi_id = dmi_first_match(force_storage_d3_dmi); + + return dmi_id || x86_match_cpu(storage_d3_cpu_ids); } /*