]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: sdhci-acpi: Only powered up enabled acpi child devices
authorHans de Goede <hdegoede@redhat.com>
Tue, 20 Dec 2016 23:19:19 +0000 (00:19 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 12 Jan 2017 11:15:20 +0000 (12:15 +0100)
commitb147bf65e5e97e7f613780b719c0ecdd37c93ced
treec4821816c76bd8d211461f172dab478c3228512d
parent17294788ac8f0657fc1d0f124ca43808b86a601c
mmc: sdhci-acpi: Only powered up enabled acpi child devices

Commit b1ee9ef5cd16 ("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: b1ee9ef5cd16 ("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>
Cc: <stable@vger.kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/sdhci-acpi.c