lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 10 Dec 2012 11:10:44 +0200
From:	Adrian Hunter <adrian.hunter@...el.com>
To:	"Rafael J. Wysocki" <rjw@...k.pl>
Cc:	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	Chris Ball <cjb@...top.org>, linux-mmc@...r.kernel.org,
	linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: [PATCH 1/1] mmc: sdhci-acpi: enable runtime-pm for device HID INT33C6

sdhci-acpi supports ACPI devices which have compatibility ID
PNP0D40, however it is not possible to know if those devices
will all work correctly with runtime-pm, so that must be configured
per hardware ID.

For INT33C6, several related quirks, capabilities and flags are set:

	MMC_CAP_NONREMOVABLE
		The SDIO card will never be removable

	SDHCI_ACPI_RUNTIME_PM
		Enable runtime-pm of the host controller

	MMC_CAP_POWER_OFF_CARD
		Enable runtime-pm of the SDIO card

	MMC_PM_KEEP_POWER
		SDIO card has the capability to remain powered up
		during system suspend

	SDHCI_QUIRK2_HOST_OFF_CARD_ON
		Always do a full reset during system resume
		because the card may be already initialized having
		not been powered off.

Wake-ups from the INT33C6 host controller are not supported, so the
following capability must *not* be set:

	MMC_PM_WAKE_SDIO_IRQ
		Enable wake on card interrupt

Signed-off-by: Adrian Hunter <adrian.hunter@...el.com>
---
 drivers/mmc/host/sdhci-acpi.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
index 6ac3617..12b0a78 100644
--- a/drivers/mmc/host/sdhci-acpi.c
+++ b/drivers/mmc/host/sdhci-acpi.c
@@ -87,7 +87,15 @@ static const struct sdhci_ops sdhci_acpi_ops_dflt = {
 	.enable_dma = sdhci_acpi_enable_dma,
 };
 
+static const struct sdhci_acpi_slot sdhci_acpi_slot_int_sdio = {
+	.quirks2 = SDHCI_QUIRK2_HOST_OFF_CARD_ON,
+	.caps    = MMC_CAP_NONREMOVABLE | MMC_CAP_POWER_OFF_CARD,
+	.flags   = SDHCI_ACPI_RUNTIME_PM,
+	.pm_caps = MMC_PM_KEEP_POWER,
+};
+
 static const struct acpi_device_id sdhci_acpi_ids[] = {
+	{ "INT33C6", (kernel_ulong_t)&sdhci_acpi_slot_int_sdio },
 	{ "PNP0D40" },
 	{ },
 };
-- 
1.7.11.7

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ