aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBalaji T K <balajitk@ti.com>2014-05-09 12:46:52 -0400
committerChris Ball <chris@printf.net>2014-05-22 08:40:43 -0400
commit2177fa9482a92c25c36eb506d38a2c1944b60adc (patch)
tree2ad7e1d26e63cf8fedf3a5f37da4bc53281db510
parent77fae21987fc5cb331029367eb04ad3d0e737050 (diff)
mmc: omap_hsmmc: fix cmd23 multiblock read/write
Check for set block count command fails always since host->cmd is set to NULL in the same function incorrectly. Correct host->cmd usage properly. Signed-off-by: Balaji T K <balajitk@ti.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Signed-off-by: Chris Ball <chris@printf.net>
-rw-r--r--drivers/mmc/host/omap_hsmmc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 140425c215ad..cba71d69a79c 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -920,16 +920,17 @@ omap_hsmmc_xfer_done(struct omap_hsmmc_host *host, struct mmc_data *data)
920static void 920static void
921omap_hsmmc_cmd_done(struct omap_hsmmc_host *host, struct mmc_command *cmd) 921omap_hsmmc_cmd_done(struct omap_hsmmc_host *host, struct mmc_command *cmd)
922{ 922{
923 host->cmd = NULL;
924
925 if (host->mrq->sbc && (host->cmd == host->mrq->sbc) && 923 if (host->mrq->sbc && (host->cmd == host->mrq->sbc) &&
926 !host->mrq->sbc->error && !(host->flags & AUTO_CMD23)) { 924 !host->mrq->sbc->error && !(host->flags & AUTO_CMD23)) {
925 host->cmd = NULL;
927 omap_hsmmc_start_dma_transfer(host); 926 omap_hsmmc_start_dma_transfer(host);
928 omap_hsmmc_start_command(host, host->mrq->cmd, 927 omap_hsmmc_start_command(host, host->mrq->cmd,
929 host->mrq->data); 928 host->mrq->data);
930 return; 929 return;
931 } 930 }
932 931
932 host->cmd = NULL;
933
933 if (cmd->flags & MMC_RSP_PRESENT) { 934 if (cmd->flags & MMC_RSP_PRESENT) {
934 if (cmd->flags & MMC_RSP_136) { 935 if (cmd->flags & MMC_RSP_136) {
935 /* response type 2 */ 936 /* response type 2 */