Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mmc: sdhci: prevent card detection activity for non-removable cards

Do not enable card detection interrupts for non-removable cards.

Signed-off-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>

authored by

Adrian Hunter and committed by
Chris Ball
c79396c1 ceb6143b

+3 -4
+3 -4
drivers/mmc/host/sdhci.c
··· 146 146 { 147 147 u32 present, irqs; 148 148 149 - if (host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) 150 - return; 151 - 152 - if (host->quirks2 & SDHCI_QUIRK2_OWN_CARD_DETECTION) 149 + if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) || 150 + (host->quirks2 & SDHCI_QUIRK2_OWN_CARD_DETECTION) || 151 + !mmc_card_is_removable(host->mmc)) 153 152 return; 154 153 155 154 present = sdhci_readl(host, SDHCI_PRESENT_STATE) &