diff options
-rw-r--r-- | drivers/mmc/core/core.c | 5 | ||||
-rw-r--r-- | include/linux/mmc/host.h | 1 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index c40396f23202..6e4d04df37e0 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c | |||
@@ -2325,14 +2325,13 @@ int mmc_detect_card_removed(struct mmc_host *host) | |||
2325 | * The card will be considered unchanged unless we have been asked to | 2325 | * The card will be considered unchanged unless we have been asked to |
2326 | * detect a change or host requires polling to provide card detection. | 2326 | * detect a change or host requires polling to provide card detection. |
2327 | */ | 2327 | */ |
2328 | if (!host->detect_change && !(host->caps & MMC_CAP_NEEDS_POLL) && | 2328 | if (!host->detect_change && !(host->caps & MMC_CAP_NEEDS_POLL)) |
2329 | !(host->caps2 & MMC_CAP2_DETECT_ON_ERR)) | ||
2330 | return ret; | 2329 | return ret; |
2331 | 2330 | ||
2332 | host->detect_change = 0; | 2331 | host->detect_change = 0; |
2333 | if (!ret) { | 2332 | if (!ret) { |
2334 | ret = _mmc_detect_card_removed(host); | 2333 | ret = _mmc_detect_card_removed(host); |
2335 | if (ret && (host->caps2 & MMC_CAP2_DETECT_ON_ERR)) { | 2334 | if (ret && (host->caps & MMC_CAP_NEEDS_POLL)) { |
2336 | /* | 2335 | /* |
2337 | * Schedule a detect work as soon as possible to let a | 2336 | * Schedule a detect work as soon as possible to let a |
2338 | * rescan handle the card removal. | 2337 | * rescan handle the card removal. |
diff --git a/include/linux/mmc/host.h b/include/linux/mmc/host.h index e326ae2882a0..38f60a97b218 100644 --- a/include/linux/mmc/host.h +++ b/include/linux/mmc/host.h | |||
@@ -272,7 +272,6 @@ struct mmc_host { | |||
272 | #define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \ | 272 | #define MMC_CAP2_HS200 (MMC_CAP2_HS200_1_8V_SDR | \ |
273 | MMC_CAP2_HS200_1_2V_SDR) | 273 | MMC_CAP2_HS200_1_2V_SDR) |
274 | #define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */ | 274 | #define MMC_CAP2_BROKEN_VOLTAGE (1 << 7) /* Use the broken voltage */ |
275 | #define MMC_CAP2_DETECT_ON_ERR (1 << 8) /* On I/O err check card removal */ | ||
276 | #define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */ | 275 | #define MMC_CAP2_HC_ERASE_SZ (1 << 9) /* High-capacity erase size */ |
277 | #define MMC_CAP2_CD_ACTIVE_HIGH (1 << 10) /* Card-detect signal active high */ | 276 | #define MMC_CAP2_CD_ACTIVE_HIGH (1 << 10) /* Card-detect signal active high */ |
278 | #define MMC_CAP2_RO_ACTIVE_HIGH (1 << 11) /* Write-protect signal active high */ | 277 | #define MMC_CAP2_RO_ACTIVE_HIGH (1 << 11) /* Write-protect signal active high */ |