public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Hans de Goede <hdegoede@redhat.com>
To: Adrian Hunter <adrian.hunter@intel.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Jean Delvare <jdelvare@suse.com>
Cc: Hans de Goede <hdegoede@redhat.com>, Takashi Iwai <tiwai@suse.de>,
	"russianneuromancer @ ya . ru" <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	[thread overview]
Message-ID: <20170225172357.26294-4-hdegoede@redhat.com> (raw)
In-Reply-To: <20170225172357.26294-1-hdegoede@redhat.com>

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 <hdegoede@redhat.com>
---
 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 <linux/pm.h>
 #include <linux/pm_runtime.h>
 #include <linux/delay.h>
+#include <linux/dmi.h>
 
 #include <linux/mmc/host.h>
 #include <linux/mmc/pm.h>
@@ -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

      parent reply	other threads:[~2017-02-25 17:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-25 17:23 [PATCH 0/3] Allow setting dmi-product-name on the cmdline + dmi sdhci quirk Hans de Goede
2017-02-25 17:23 ` [PATCH 1/3] firmware: dmi_scan: Add dmi_product_name kernel cmdline option Hans de Goede
2017-03-03  9:24   ` Jean Delvare
2017-03-03 14:27     ` Hans de Goede
2017-03-09  9:59       ` Jean Delvare
2017-03-09 10:43         ` Hans de Goede
2017-03-20 17:35           ` Takashi Iwai
2017-04-04 10:21           ` Hans de Goede
2017-02-25 17:23 ` [PATCH 2/3] mmc: sdhci-acpi: Check device status before calling fix_up_power() Hans de Goede
2017-02-25 18:31   ` Hans de Goede
2017-03-02 11:53   ` Adrian Hunter
2017-03-03  9:09   ` Jean Delvare
2017-03-03 13:59     ` Hans de Goede
2017-02-25 17:23 ` Hans de Goede [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170225172357.26294-4-hdegoede@redhat.com \
    --to=hdegoede@redhat.com \
    --cc=adrian.hunter@intel.com \
    --cc=jdelvare@suse.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=russianneuromancer@ya.ru \
    --cc=tiwai@suse.de \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox