]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: mxs: fix card detection in case of 'broken-cd' flag set
authorRoman Peniaev <r.peniaev@gmail.com>
Tue, 10 Jun 2014 14:57:02 +0000 (23:57 +0900)
committerUlf Hansson <ulf.hansson@linaro.org>
Wed, 9 Jul 2014 09:26:12 +0000 (11:26 +0200)
commit6476ad2e87a4e87da709dbe9f0862c37bf635fdb
treeccf90b2d548aaab928faa989a74caa715cf4789f
parent88ed408d2927f066acdc03f62ca69502371fdb7f
mmc: mxs: fix card detection in case of 'broken-cd' flag set

In case of reboot my olinuxino imx23 board does not see
mmc card any more. mmc_rescan is being called by delayed
work in loop, but mxs_mmc_get_cd always returns 0, so we
will never pass the card detection check and will not do
further card inition.

This patch is just an attempt to partially revert the patch
f1da1ba49f of Sascha Hauer, where it is claimed that upper
layer will handle broken card detection using the polling
logic and MMC_CAP_NEEDS_POLL capability, but seems it is not
true, because upper logic still expects 1 from 'get_cd'.

So, here we always return 1 (card present) in case of
MMC_CAP_NEEDS_POLL capability set.

Signed-off-by: Roman Pen <r.peniaev@gmail.com>
CC: Chris Ball <chris@printf.net>
CC: Sascha Hauer <s.hauer@pengutronix.de>
CC: Fabio Estevam <fabio.estevam@freescale.com>
CC: Shawn Guo <shawn.guo@linaro.org>
CC: Ulf Hansson <ulf.hansson@linaro.org>
CC: linux-mmc@vger.kernel.org
CC: linux-kernel@vger.kernel.org
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/mxs-mmc.c