]> git.baikalelectronics.ru Git - kernel.git/commit
mmc: core: Restore parts of the polling policy when switch to HS/HS DDR
authorUlf Hansson <ulf.hansson@linaro.org>
Fri, 13 Jan 2017 11:05:03 +0000 (12:05 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 16 Jan 2017 15:17:42 +0000 (16:17 +0100)
commit2e4a28a82747dbf11cdf83625d4aed8ea77115f5
tree6258986622ca4d4c6db346c48bd317c4650ab583
parentfbe3101260fd5eba8d3a0965d84b0c0c82c978c0
mmc: core: Restore parts of the polling policy when switch to HS/HS DDR

Regressions for not being able to detect an eMMC HS DDR mode card has been
reported for the sdhci-esdhc-imx driver, but potentially other sdhci
variants may suffer from the similar problem.

The commit 37601539b709 ("mmc: core: Update CMD13 polling policy when
switch to HS DDR mode"), is causing the problem. It seems that change moved
one step to far, regarding changing the host's timing before polling for a
busy card.

To fix this, let's move back to the behaviour when the host's timing is
updated after the polling, but before the switch status is fetched and
validated.

In cases when polling with CMD13, we keep validating the switch status at
each attempt. However, to align with the other card busy detections
mechanism, let's fetch and validate the switch status also after the host's
timing is updated.

Reported-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Reported-by: Gary Bisson <gary.bisson@boundarydevices.com>
Fixes: 37601539b709 ("mmc: core: Update CMD13 polling policy when switch..")
Cc: Shawn Lin <shawn.lin@rock-chips.com>
Cc: Dong Aisheng <aisheng.dong@nxp.com>
Cc: Haibo Chen <haibo.chen@nxp.com>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Clemens Gruber <clemens.gruber@pqgruber.com>
Tested-by: Jagan Teki <jagan@amarulasolutions.com>
Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com>
Tested-by: Haibo Chen <haibo.chen@nxp.com>
Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com>
drivers/mmc/core/mmc_ops.c