[PATCH 1/2] mmc: dw_mmc: Only enable CD after setup and only if needed

Javier Martinez Canillas javier.martinez at collabora.co.uk
Wed Feb 25 10:52:25 PST 2015


Hello Doug,

On 02/25/2015 07:11 PM, Doug Anderson wrote:
> We really don't want to get a card detect interrupt during probe time
> since it can confuse things.  Let's disable the card detect interrupt
> until we're in a really good place: the end of probe.  Let's also
> simply avoid enabling the card detect interrupt if it's not used.
> 
> It appears that (at least on rk3288) when vqmmc is turned on it can
> cause a bogus "card detect" interrupt.  That meant that we were
> getting a predictable card detect interrupt while we were in
> mmc_add_host().  On the version of the kernel I'm working with at
> least (3.14), this is not a great time to get a card detect interrupt
> since I think that we don't grab all the needed locks in
> mmc_add_host() and children.  I put stack dumps in dw_mci_setup_bus()
> and found that I could see two distinct stack crawls that looked like:
> 
> Caller one:
> * dw_mci_setup_bus
> * dw_mci_set_ios
> * mmc_power_up
> * mmc_start_host
> * mmc_add_host
> 
> Caller two:
> * dw_mci_setup_bus
> * dw_mci_set_ios
> * mmc_set_chip_select
> * mmc_go_idle
> * mmc_rescan
> * process_one_work
> * worker_thread
> * kthread
> 
> Signed-off-by: Doug Anderson <dianders at chromium.org>
>

On an Exynos5250 Snow, Exynos5420 Peach Pit and Exynos5800 Peach Pi:

Tested-by: Javier Martinez Canillas <javier.martinez at collabora.co.uk>

Best regards,
Javier




More information about the Linux-rockchip mailing list