From: Dong Aisheng Date: Tue, 31 Dec 2013 08:22:44 +0000 (+0800) Subject: MLK-11685-3 mmc: sdhci: do not enable card detect interrupt for gpio cd type X-Git-Tag: C0P2-H0.0--20200415~4192 X-Git-Url: https://git.somdevices.com/?a=commitdiff_plain;h=ec739d48ef1707bb3524e22813d9cad6ef8c1679;p=linux.git MLK-11685-3 mmc: sdhci: do not enable card detect interrupt for gpio cd type Except SDHCI_QUIRK_BROKEN_CARD_DETECTION and MMC_CAP_NONREMOVABLE, we also do not need to handle controller native card detect interrupt for gpio as card detect case. If we wrong enabled the card detect interrupt for gpio case, it will cause a lot of unexpected card detect interrupts during data transfer which should not happen. Signed-off-by: Dong Aisheng (cherry picked from commit 2bf47f78bee173798e6d6f360b12defd945c936c) Signed-off-by: Haibo Chen Conflicts: drivers/mmc/host/sdhci.c --- diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 7d275e72903a..890e37a85b97 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -117,9 +117,10 @@ static inline bool sdhci_data_line_cmd(struct mmc_command *cmd) static void sdhci_set_card_detection(struct sdhci_host *host, bool enable) { u32 present; + int gpio_cd = mmc_gpio_get_cd(host->mmc); if ((host->quirks & SDHCI_QUIRK_BROKEN_CARD_DETECTION) || - !mmc_card_is_removable(host->mmc)) + !mmc_card_is_removable(host->mmc) || !IS_ERR_VALUE(gpio_cd)) return; if (enable) {