From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751912AbdBYRYP (ORCPT ); Sat, 25 Feb 2017 12:24:15 -0500 Received: from mx1.redhat.com ([209.132.183.28]:60448 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751568AbdBYRYH (ORCPT ); Sat, 25 Feb 2017 12:24:07 -0500 From: Hans de Goede To: Adrian Hunter , Ulf Hansson , Jean Delvare Cc: Hans de Goede , Takashi Iwai , "russianneuromancer @ ya . ru" , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/3] mmc: sdhci-acpi: Add a quirk to not break wifi on GPD WIN I55 machines Date: Sat, 25 Feb 2017 18:23:57 +0100 Message-Id: <20170225172357.26294-4-hdegoede@redhat.com> In-Reply-To: <20170225172357.26294-1-hdegoede@redhat.com> References: <20170225172357.26294-1-hdegoede@redhat.com> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Sat, 25 Feb 2017 17:24:07 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The GPD WIN (I55) has a bug in its ACPI tables where putting the unused 80860F14 UID 2 (SDIO) device in PS0 toggles a gpio disabling the pcie wifi until the next reboot. Add a quirk to skip probing of the unused SDIO controller, fixing this. Signed-off-by: Hans de Goede --- drivers/mmc/host/sdhci-acpi.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c index 873beae..957d0b8 100644 --- a/drivers/mmc/host/sdhci-acpi.c +++ b/drivers/mmc/host/sdhci-acpi.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include @@ -397,6 +398,18 @@ static int sdhci_acpi_probe(struct platform_device *pdev) if (acpi_bus_get_status(device) || !device->status.present) return -ENODEV; + hid = acpi_device_hid(device); + uid = device->pnp.unique_id; + + /* + * The GPD WIN (I55) has a bug in its ACPI tables where putting the + * unused 80860F14 UID 2 (SDIO) device in PS0 toggles a gpio + * disabling the pcie wifi. + */ + if (strcmp(hid, "80860F14") == 0 && strcmp(uid, "2") == 0 && + dmi_match(DMI_PRODUCT_NAME, "GPD-WINI55")) + return -ENODEV; + /* Power on the SDHCI controller and its children */ acpi_device_fix_up_power(device); list_for_each_entry(child, &device->children, node) @@ -406,9 +419,6 @@ static int sdhci_acpi_probe(struct platform_device *pdev) if (sdhci_acpi_byt_defer(dev)) return -EPROBE_DEFER; - hid = acpi_device_hid(device); - uid = device->pnp.unique_id; - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0); if (!iomem) return -ENOMEM; -- 2.9.3