Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp3624713pxb; Mon, 24 Jan 2022 13:47:57 -0800 (PST) X-Google-Smtp-Source: ABdhPJx1B2HpvSrauJ+YUAcr3js8GolLs69HY5u04bwfKx0l0xqaps/WyZaLh3MwyLdVZ1Omh9OM X-Received: by 2002:a17:90b:4c0f:: with SMTP id na15mr312822pjb.156.1643060787170; Mon, 24 Jan 2022 13:46:27 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643060787; cv=none; d=google.com; s=arc-20160816; b=IERfc8+3cJ6c5VMja2gKldNhDDP4Bm4UulaUfHxLLYSOTKnHRxex85LXututPo+920 W2/12hdCop+x5+VBiEyrkRg9g610l328Tpxhw6b022uKogrdCqyj29GToL/Ixo5RdECX H070s71U5qbGSGIK1i+15UiTVN4QQGDVVeASV9yNrsWexEVq6yEC3+G0QqzJhSKmQfE5 wesVycmTEBLwd+06HWcRnDMrJK3c1dS67OXP719vpKw2lSxuqGeyYxd1bM0EWAWjeho5 yxApvjo8u0CFs1mxlHe5UtSA2rrVyipysmAotuCMSEVUNRgf/keuQb0WhqvBVf01Tpvd AfKg== 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=P9OigI1N/Bfopao4RUBiguI8DX+y12oXJQOLzvewVdA=; b=e3p69+XZ/4YHaV2dh0UEcGGlRi67X5mJw+/lBRwGS7wTFJAgzW0HACdBlieazASoCb /d0bepP7akvTP4GegmaQFTISC0tI26CxHT7UKkTP0Zd/rEVEYo3drmDK5hoE38VdWBPT 65/5BnhMf15/lnInpdbzzoTCVg710Ie9E8Bq3kxq3lXbuL9IPNzT5Sbx3FXsKgPe1W1N St3iR039NPFmH0zGLEB53pO0jhznYXOv5NvT7Aa1rsWae+GOesmsEYUt0phG8IT91Hi1 PJ+02IziuAKxo4rL41qij7K0pa38+aGV+uHKxHpOVGnsiM8WZnM0i6Y1iaLV2APu1uLQ a7pA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JRhkQZvZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f68si1430192pgc.639.2022.01.24.13.46.15; Mon, 24 Jan 2022 13:46:27 -0800 (PST) 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; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=JRhkQZvZ; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1452726AbiAXV0W (ORCPT + 99 others); Mon, 24 Jan 2022 16:26:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42820 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1358951AbiAXUtC (ORCPT ); Mon, 24 Jan 2022 15:49:02 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 836AAC0418AE; Mon, 24 Jan 2022 11:57:55 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 2557060BA1; Mon, 24 Jan 2022 19:57:55 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0B6B4C340E5; Mon, 24 Jan 2022 19:57:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1643054274; bh=YnzVyzVF2gyXnAhBU7QgCxTIBetL5S/Hebevk1xn7XQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JRhkQZvZYQN4M77HDVr6lOp2RgeMfadFKWh9kNeKidMQ0SycGw9hoOB2fyAvKbfnm BU/hzYc/p4jRl84yaFSVyNMdrhRTaihdPBfvslssGKCV5uNuyBmPMbZsdoKRByXJaq eVcJPt3F90lK3n83vV8nnGfBsPJNUntWYxWn8874= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , "Rafael J. Wysocki" , Sasha Levin Subject: [PATCH 5.10 336/563] ACPI / x86: Add not-present quirk for the PCI0.SDHB.BRC1 device on the GPD win Date: Mon, 24 Jan 2022 19:41:41 +0100 Message-Id: <20220124184036.057066427@linuxfoundation.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220124184024.407936072@linuxfoundation.org> References: <20220124184024.407936072@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Hans de Goede [ Upstream commit 57d2dbf710d832841872fb15ebb79429cab90fae ] The GPD win and its sibling the GPD pocket (99% the same electronics in a different case) use a PCI wifi card. But the ACPI tables on both variants contain a bug where the SDIO MMC controller for SDIO wifi cards is enabled despite this. This SDIO MMC controller has a PCI0.SDHB.BRC1 child-device which _PS3 method sets a GPIO causing the PCI wifi card to turn off. At the moment there is a pretty ugly kludge in the sdhci-acpi.c code, just to work around the bug in the DSDT of this single design. This can be solved cleaner/simply with a quirk overriding the _STA return of the broken PCI0.SDHB.BRC1 PCI0.SDHB.BRC1 child with a status value of 0, so that its power_manageable flag gets cleared, avoiding this problem. Note that even though it is not used, the _STA method for the MMC controller is deliberately not overridden. If the status of the MMC controller were forced to 0 it would never get suspended, which would cause these mini-laptops to not reach S0i3 level when suspended. Signed-off-by: Hans de Goede Signed-off-by: Rafael J. Wysocki Signed-off-by: Sasha Levin --- drivers/acpi/x86/utils.c | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/x86/utils.c b/drivers/acpi/x86/utils.c index 91bbc4b6b8035..3f9a162be84e3 100644 --- a/drivers/acpi/x86/utils.c +++ b/drivers/acpi/x86/utils.c @@ -94,9 +94,10 @@ static const struct override_status_id override_status_ids[] = { /* * The GPD win BIOS dated 20170221 has disabled the accelerometer, the * drivers sometimes cause crashes under Windows and this is how the - * manufacturer has solved this :| Note that the the DMI data is less - * generic then it seems, a board_vendor of "AMI Corporation" is quite - * rare and a board_name of "Default String" also is rare. + * manufacturer has solved this :| The DMI match may not seem unique, + * but it is. In the 67000+ DMI decode dumps from linux-hardware.org + * only 116 have board_vendor set to "AMI Corporation" and of those 116 + * only the GPD win and pocket entries' board_name is "Default string". * * Unfortunately the GPD pocket also uses these strings and its BIOS * was copy-pasted from the GPD win, so it has a disabled KIOX000A @@ -120,6 +121,19 @@ static const struct override_status_id override_status_ids[] = { DMI_MATCH(DMI_PRODUCT_NAME, "Default string"), DMI_MATCH(DMI_BIOS_DATE, "05/25/2017") }), + + /* + * The GPD win/pocket have a PCI wifi card, but its DSDT has the SDIO + * mmc controller enabled and that has a child-device which _PS3 + * method sets a GPIO causing the PCI wifi card to turn off. + * See above remark about uniqueness of the DMI match. + */ + NOT_PRESENT_ENTRY_PATH("\\_SB_.PCI0.SDHB.BRC1", ATOM_AIRMONT, { + DMI_EXACT_MATCH(DMI_BOARD_VENDOR, "AMI Corporation"), + DMI_EXACT_MATCH(DMI_BOARD_NAME, "Default string"), + DMI_EXACT_MATCH(DMI_BOARD_SERIAL, "Default string"), + DMI_EXACT_MATCH(DMI_PRODUCT_NAME, "Default string"), + }), }; bool acpi_device_override_status(struct acpi_device *adev, unsigned long long *status) -- 2.34.1