alistair23-linux/drivers/mmc/core
Ulf Hansson 5ec32f8411 mmc: core: Check SWITCH_ERROR bit from each CMD13 response when polling
According to the JEDEC specification, the SWITCH_ERROR bit in the device
status from a R1 response, is an error bit which may be cleared as soon as
the response that reports the error is sent.

When polling with CMD13 to find out when the card stops signaling busy
after a CMD6 has been sent, we currently parse only the last CMD13 response
for the SWITCH_ERROR bit. Consequentially we could loose important
information about the card.

In worst case if the card stops signaling busy within the allowed timeout,
we could end up believing that the CMD6 command completed successfully,
when in fact it didn't.

To improve the behaviour, let's parse each CMD13 response to see if the
SWITCH_ERROR bit is set in the device status. In such case, we abort the
polling loop and report the error.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Tested-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
2016-11-29 09:05:24 +01:00
..
bus.c mmc: core: implement enhanced strobe support 2016-07-25 10:34:05 +02:00
bus.h
core.c mmc: core: use enum mmc_blk_status properly 2016-11-29 09:00:51 +01:00
core.h mmc: fix mmc_{un,}register_pm_notifier prototypes 2015-12-22 11:32:09 +01:00
debugfs.c mmc: debugfs: add HS400 enhanced strobe description 2016-07-25 10:34:06 +02:00
host.c mmc: core: expose MMC_CAP2_NO_* to dt 2016-07-25 10:34:49 +02:00
host.h mmc: host: Add facility to support re-tuning 2015-06-01 09:06:53 +02:00
Kconfig mmc: pwrseq: convert to proper platform device 2016-05-02 10:33:30 +02:00
Makefile mmc: pwrseq: convert to proper platform device 2016-05-02 10:33:30 +02:00
mmc.c mmc: core: Make mmc_switch_status() available for mmc core 2016-11-29 09:00:33 +01:00
mmc_ops.c mmc: core: Check SWITCH_ERROR bit from each CMD13 response when polling 2016-11-29 09:05:24 +01:00
mmc_ops.h mmc: core: Rename ignore_crc to retry_crc_err to reflect its purpose 2016-11-29 09:05:23 +01:00
pwrseq.c mmc: pwrseq: convert to proper platform device 2016-05-02 10:33:30 +02:00
pwrseq.h mmc: pwrseq: convert to proper platform device 2016-05-02 10:33:30 +02:00
pwrseq_emmc.c mmc: pwrseq: convert to proper platform device 2016-05-02 10:33:30 +02:00
pwrseq_simple.c mmc: pwrseq-simple: Add an optional post-power-on-delay 2016-09-26 21:31:07 +02:00
quirks.c mmc: core: Disable HPI for certain Hynix eMMC cards 2016-07-25 10:34:12 +02:00
sd.c mmc: sd: Export SD Status via “ssr” device attribute 2016-09-26 21:31:09 +02:00
sd.h mmc: drop the speed mode of card's state 2014-05-12 18:05:53 -04:00
sd_ops.c mmc: remove unnecessary assignment statements before return 2016-02-29 11:02:47 +01:00
sd_ops.h
sdio.c mmc: core: remove redundant memset of sdio_read_cccr 2016-03-17 14:54:41 +01:00
sdio_bus.c mmc: enable MMC/SD/SDIO device to suspend/resume asynchronously 2015-12-22 11:32:16 +01:00
sdio_bus.h
sdio_cis.c mmc: sdio: fall back to SDIO 1.0 for broken 1.1 cards 2016-05-16 11:31:27 +02:00
sdio_cis.h
sdio_io.c mmc: sdio: deploy error handling instead of triggering BUG_ON 2016-09-26 21:31:15 +02:00
sdio_irq.c mmc: core: Remove MMC_CLKGATE 2015-10-26 16:00:09 +01:00
sdio_ops.c mmc: sdio: deploy error handling instead of triggering BUG_ON 2016-09-26 21:31:15 +02:00
sdio_ops.h mmc: Add mmc_is_io_op helper function 2015-10-26 16:00:01 +01:00
slot-gpio.c mmc: core: expose the capability of gpio card detect 2016-11-29 09:00:37 +01:00
slot-gpio.h mmc: slot-gpio: Make mmc_gpio_alloc() available for MMC core 2015-01-19 09:56:17 +01:00