]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
3.13-stable patches
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2014 18:30:44 +0000 (10:30 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 Feb 2014 18:30:44 +0000 (10:30 -0800)
added patches:
mmc-sdhci-pci-fix-byt-sd-card-getting-stuck-in-runtime-suspend.patch

queue-3.13/mmc-sdhci-pci-fix-byt-sd-card-getting-stuck-in-runtime-suspend.patch [new file with mode: 0644]
queue-3.13/series

diff --git a/queue-3.13/mmc-sdhci-pci-fix-byt-sd-card-getting-stuck-in-runtime-suspend.patch b/queue-3.13/mmc-sdhci-pci-fix-byt-sd-card-getting-stuck-in-runtime-suspend.patch
new file mode 100644 (file)
index 0000000..a3b5c01
--- /dev/null
@@ -0,0 +1,73 @@
+From 77a0122e0838663795651aa0beb2325156f98c09 Mon Sep 17 00:00:00 2001
+From: Adrian Hunter <adrian.hunter@intel.com>
+Date: Mon, 13 Jan 2014 09:49:16 +0200
+Subject: mmc: sdhci-pci: Fix BYT sd card getting stuck in runtime suspend
+
+From: Adrian Hunter <adrian.hunter@intel.com>
+
+commit 77a0122e0838663795651aa0beb2325156f98c09 upstream.
+
+A host controller for a SD card may need a GPIO for card detect in order
+to wake up from runtime suspend when a card is inserted.  If that GPIO is
+not configured, then the host controller will not wake up.  Fix that for
+the affected devices by not enabling runtime PM unless the GPIO is
+successfully set up.
+
+This affects BYT sd card host controller which had runtime PM enabled from
+v3.11.  For completeness, the MFD sd card host controller is flagged also.
+
+The original patch before rebasing (see link below) was tested on v3.11.10
+and v3.12.4 although the patch applied with some offsets and fuzz.  The
+original patch is here:
+
+    http://marc.info/?l=linux-mmc&m=138676702327057
+
+Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
+Signed-off-by: Chris Ball <chris@printf.net>
+Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
+
+---
+ drivers/mmc/host/sdhci-pci.c |   11 +++++++++++
+ 1 file changed, 11 insertions(+)
+
+--- a/drivers/mmc/host/sdhci-pci.c
++++ b/drivers/mmc/host/sdhci-pci.c
+@@ -65,6 +65,7 @@ struct sdhci_pci_fixes {
+       unsigned int            quirks;
+       unsigned int            quirks2;
+       bool                    allow_runtime_pm;
++      bool                    own_cd_for_runtime_pm;
+       int                     (*probe) (struct sdhci_pci_chip *);
+@@ -296,6 +297,7 @@ static const struct sdhci_pci_fixes sdhc
+ static const struct sdhci_pci_fixes sdhci_intel_mfd_sd = {
+       .quirks         = SDHCI_QUIRK_NO_ENDATTR_IN_NOPDESC,
+       .allow_runtime_pm = true,
++      .own_cd_for_runtime_pm = true,
+ };
+ static const struct sdhci_pci_fixes sdhci_intel_mfd_sdio = {
+@@ -360,6 +362,7 @@ static const struct sdhci_pci_fixes sdhc
+ static const struct sdhci_pci_fixes sdhci_intel_byt_sd = {
+       .quirks2        = SDHCI_QUIRK2_CARD_ON_NEEDS_BUS_ON,
+       .allow_runtime_pm = true,
++      .own_cd_for_runtime_pm = true,
+ };
+ /* Define Host controllers for Intel Merrifield platform */
+@@ -1458,6 +1461,14 @@ static struct sdhci_pci_slot *sdhci_pci_
+       sdhci_pci_add_own_cd(slot);
++      /*
++       * Check if the chip needs a separate GPIO for card detect to wake up
++       * from runtime suspend.  If it is not there, don't allow runtime PM.
++       * Note sdhci_pci_add_own_cd() sets slot->cd_gpio to -EINVAL on failure.
++       */
++      if (chip->fixes->own_cd_for_runtime_pm && !gpio_is_valid(slot->cd_gpio))
++              chip->allow_runtime_pm = false;
++
+       return slot;
+ remove:
index 906bccdfda2e3b8d2cad9ff6678afa47f2467aa0..bc4348b18af2d370c9554f37389bbb7de904a5d4 100644 (file)
@@ -116,3 +116,4 @@ timekeeping-avoid-possible-deadlock-from-clock_was_set_delayed.patch
 timekeeping-fix-clock_tai-timer-nanosleep-delays.patch
 timekeeping-fix-missing-timekeeping_update-in-suspend-path.patch
 rtc-cmos-add-an-alarm-disable-quirk.patch
+mmc-sdhci-pci-fix-byt-sd-card-getting-stuck-in-runtime-suspend.patch