stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Patch "mmc: sdhci-acpi: Only powered up enabled acpi child devices" has been added to the 4.9-stable tree
@ 2017-01-23 14:36 gregkh
  0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-01-23 14:36 UTC (permalink / raw)
  To: hdegoede, adrian.hunter, gregkh, ulf.hansson; +Cc: stable, stable-commits


This is a note to let you know that I've just added the patch titled

    mmc: sdhci-acpi: Only powered up enabled acpi child devices

to the 4.9-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     mmc-sdhci-acpi-only-powered-up-enabled-acpi-child-devices.patch
and it can be found in the queue-4.9 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.


>From e1d070c3793a2766122865a7c2142853b48808c5 Mon Sep 17 00:00:00 2001
From: Hans de Goede <hdegoede@redhat.com>
Date: Wed, 21 Dec 2016 00:19:19 +0100
Subject: mmc: sdhci-acpi: Only powered up enabled acpi child devices

From: Hans de Goede <hdegoede@redhat.com>

commit e1d070c3793a2766122865a7c2142853b48808c5 upstream.

Commit e5bbf30733f9 ("mmc: sdhci-acpi: Ensure connected devices are
powered when probing") introduced code to powerup any acpi child
nodes listed in the dstd. But some dstd-s list all possible devices
used on some board variants, while reporting if the device is actually
present and enabled in the status field of the device.

So we end up calling the acpi _PS0 (power-on) method for devices which
are not actually present. This does not always end well, e.g. on my
cube iwork8 air tablet, this results in freezing the entire tablet as
soon as the r8723bs module is loaded.

This commit fixes this by checking the child device's status.present
and status.enabled bits and only call acpi_device_fix_up_power()
if both are set.

Fixes: e5bbf30733f9 ("mmc: sdhci-acpi: Ensure connected devices are powered when probing")
BugLink: https://github.com/hadess/rtl8723bs/issues/80
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 drivers/mmc/host/sdhci-acpi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -394,7 +394,8 @@ static int sdhci_acpi_probe(struct platf
 	/* Power on the SDHCI controller and its children */
 	acpi_device_fix_up_power(device);
 	list_for_each_entry(child, &device->children, node)
-		acpi_device_fix_up_power(child);
+		if (child->status.present && child->status.enabled)
+			acpi_device_fix_up_power(child);
 
 	if (acpi_bus_get_status(device) || !device->status.present)
 		return -ENODEV;


Patches currently in stable-queue which might be from hdegoede@redhat.com are

queue-4.9/mmc-sdhci-acpi-only-powered-up-enabled-acpi-child-devices.patch

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-01-23 14:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-01-23 14:36 Patch "mmc: sdhci-acpi: Only powered up enabled acpi child devices" has been added to the 4.9-stable tree gregkh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).