diff options
author | San Mehat <san@google.com> | 2009-11-24 15:24:55 -0500 |
---|---|---|
committer | Daniel Walker <dwalker@codeaurora.org> | 2010-03-18 16:37:17 -0400 |
commit | b3b0ca84cfec581fba3ea8efaa8052cb5e6fc857 (patch) | |
tree | c558feab0c26e285fafca07e266d5f1b19b7d0bb | |
parent | f4748499d3dc5e7cadecb977f0d4f1f4f4a8d8c5 (diff) |
mmc: msm_sdcc: Fix issue where we might not end a sucessfull request
Signed-off-by: San Mehat <san@google.com>
Signed-off-by: Daniel Walker <dwalker@codeaurora.org>
-rw-r--r-- | drivers/mmc/host/msm_sdcc.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c index bdafb642a713..3ea66971edfc 100644 --- a/drivers/mmc/host/msm_sdcc.c +++ b/drivers/mmc/host/msm_sdcc.c | |||
@@ -208,6 +208,7 @@ msmsdcc_dma_complete_func(struct msm_dmov_cmd *cmd, | |||
208 | 208 | ||
209 | mrq = host->curr.mrq; | 209 | mrq = host->curr.mrq; |
210 | BUG_ON(!mrq); | 210 | BUG_ON(!mrq); |
211 | WARN_ON(!mrq->data); | ||
211 | 212 | ||
212 | if (!(result & DMOV_RSLT_VALID)) { | 213 | if (!(result & DMOV_RSLT_VALID)) { |
213 | pr_err("msmsdcc: Invalid DataMover result\n"); | 214 | pr_err("msmsdcc: Invalid DataMover result\n"); |
@@ -719,14 +720,13 @@ static void | |||
719 | msmsdcc_handle_irq_data(struct msmsdcc_host *host, u32 status, | 720 | msmsdcc_handle_irq_data(struct msmsdcc_host *host, u32 status, |
720 | void __iomem *base) | 721 | void __iomem *base) |
721 | { | 722 | { |
722 | struct mmc_data *data; | 723 | struct mmc_data *data = host->curr.data; |
723 | 724 | ||
724 | if (status & (MCI_CMDSENT | MCI_CMDRESPEND | MCI_CMDCRCFAIL | | 725 | if (status & (MCI_CMDSENT | MCI_CMDRESPEND | MCI_CMDCRCFAIL | |
725 | MCI_CMDTIMEOUT) && host->curr.cmd) { | 726 | MCI_CMDTIMEOUT) && host->curr.cmd) { |
726 | msmsdcc_do_cmdirq(host, status); | 727 | msmsdcc_do_cmdirq(host, status); |
727 | } | 728 | } |
728 | 729 | ||
729 | data = host->curr.data; | ||
730 | if (!data) | 730 | if (!data) |
731 | return; | 731 | return; |
732 | 732 | ||
@@ -739,7 +739,8 @@ msmsdcc_handle_irq_data(struct msmsdcc_host *host, u32 status, | |||
739 | msm_dmov_stop_cmd(host->dma.channel, | 739 | msm_dmov_stop_cmd(host->dma.channel, |
740 | &host->dma.hdr, 0); | 740 | &host->dma.hdr, 0); |
741 | else { | 741 | else { |
742 | msmsdcc_stop_data(host); | 742 | if (host->curr.data) |
743 | msmsdcc_stop_data(host); | ||
743 | if (!data->stop) | 744 | if (!data->stop) |
744 | msmsdcc_request_end(host, data->mrq); | 745 | msmsdcc_request_end(host, data->mrq); |
745 | else | 746 | else |