aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/dw_mmc.c
diff options
context:
space:
mode:
authorDoug Anderson <dianders@chromium.org>2013-08-30 11:11:06 -0400
committerChris Ball <cjb@laptop.org>2013-09-25 21:31:22 -0400
commit369ac8614fcef040f96f6548acb43dcefebd21b9 (patch)
tree48503c581eb0148221e139b8251806fe4a53ae1a /drivers/mmc/host/dw_mmc.c
parent357002b9c09e5332c9fcd4fa3d3c0fa00ca6ae4f (diff)
mmc: dw_mmc: don't queue up a card detect at slot startup
The MMC subsystem handles looking for a card at probe time. Queuing up our own can race with the rest of the MMC subsystem and cause problems if we get unlucky with timing. Just remove driver own detection triggering. While progressing the request from 'mmc_rescan', if 'dw_mci_work_routine_card' routine is activated, it will cancel the current request. The problem case is that 'mmc_rescan' is prior to 'dw_mci_work_routine_card' from host own. Specifically, the following message shows the detection problem in driver's probing. It would get an err -123 (-ENOMEDIUM) during probe. [ 4.216595] dwmmc_exynos 12210000.dwmmc1: Using internal DMA controller. [ 4.395935] dwmmc_exynos 12210000.dwmmc1: Version ID is 250a [ 4.401948] dwmmc_exynos 12210000.dwmmc1: DW MMC controller at irq 108, 64 bit host data width, 64 deep fifo [ 4.424430] dwmmc_exynos 12210000.dwmmc1: sdr0 mode (irq=108, width=0) [ 4.453975] dwmmc_exynos 12210000.dwmmc1: sdr0 mode (irq=108, width=0) [ 4.459592] mmc_host mmc1: Bus speed (slot 0) = 100000000Hz (slot req 400000Hz, actual 400000HZ div = 125) [ 4.484258] dwmmc_exynos 12210000.dwmmc1: 1 slots initialized [ 4.485406] dwmmc_exynos 12210000.dwmmc1: sdr0 mode (irq=108, width=0) [ 4.487606] dwmmc_exynos 12210000.dwmmc1: sdr0 mode (irq=108, width=0) [ 4.489794] dwmmc_exynos 12210000.dwmmc1: sdr0 mode (irq=108, width=0) [ 4.509757] mmc1: error -123 whilst initialising SDIO card Signed-off-by: Doug Anderson <dianders@chromium.org> Acked-by: Seungwon Jeon <tgih.jun@samsung.com> Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/dw_mmc.c')
-rw-r--r--drivers/mmc/host/dw_mmc.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/drivers/mmc/host/dw_mmc.c b/drivers/mmc/host/dw_mmc.c
index 018f365e5ae4..7192f89b15ae 100644
--- a/drivers/mmc/host/dw_mmc.c
+++ b/drivers/mmc/host/dw_mmc.c
@@ -2008,12 +2008,6 @@ static int dw_mci_init_slot(struct dw_mci *host, unsigned int id)
2008 /* Card initially undetected */ 2008 /* Card initially undetected */
2009 slot->last_detect_state = 0; 2009 slot->last_detect_state = 0;
2010 2010
2011 /*
2012 * Card may have been plugged in prior to boot so we
2013 * need to run the detect tasklet
2014 */
2015 queue_work(host->card_workqueue, &host->card_work);
2016
2017 return 0; 2011 return 0;
2018 2012
2019err_setup_bus: 2013err_setup_bus: