aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mmc/sdhci.h
diff options
context:
space:
mode:
authorChanho Min <chanho.min@lge.com>2014-08-29 23:40:40 -0400
committerUlf Hansson <ulf.hansson@linaro.org>2014-09-09 07:59:23 -0400
commite99783a45220a2c5f5a598e0e81213ecf2dbcf2f (patch)
tree5e75b56488d2ab0da687cb17d1b93554f2565549 /include/linux/mmc/sdhci.h
parent0b10f478d2ad93b3808d018327465aaab77c8d2b (diff)
mmc: sdhci: handle busy-end interrupt during command
It is fully legal for a controller to start handling busy-end interrupt before it has signaled that the command has completed. So make sure we do things in the proper order, Or it results that command interrupt is ignored so it can cause unexpected operations. This is founded at some toshiba emmc with the bellow warning. "mmc0: Got command interrupt 0x00000001 even though no command operation was in progress." This issue has been also reported by Youssef TRIKI: It is not specific to Toshiba devices, and happens with eMMC devices as well as SD card which support Auto-CMD12 rather than CMD23. Also, similar patch is submitted by: Gwendal Grignou <gwendal@chromium.org> Changes since v1: Fixed conflict with the next of git.linaro.org/people/ulf.hansson/mmc.git and Tested if issue is fixed again. Signed-off-by: Hankyung Yu <hankyung.yu@lge.com> Signed-off-by: Chanho Min <chanho.min@lge.com> Tested-by: Youssef TRIKI <youssef.triki@st.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'include/linux/mmc/sdhci.h')
-rw-r--r--include/linux/mmc/sdhci.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/mmc/sdhci.h b/include/linux/mmc/sdhci.h
index 09ebe57d5ce9..0aa85ca0c788 100644
--- a/include/linux/mmc/sdhci.h
+++ b/include/linux/mmc/sdhci.h
@@ -146,6 +146,7 @@ struct sdhci_host {
146 struct mmc_command *cmd; /* Current command */ 146 struct mmc_command *cmd; /* Current command */
147 struct mmc_data *data; /* Current data request */ 147 struct mmc_data *data; /* Current data request */
148 unsigned int data_early:1; /* Data finished before cmd */ 148 unsigned int data_early:1; /* Data finished before cmd */
149 unsigned int busy_handle:1; /* Handling the order of Busy-end */
149 150
150 struct sg_mapping_iter sg_miter; /* SG state for PIO */ 151 struct sg_mapping_iter sg_miter; /* SG state for PIO */
151 unsigned int blocks; /* remaining PIO blocks */ 152 unsigned int blocks; /* remaining PIO blocks */