aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/mmci.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mmc/host/mmci.c')
-rw-r--r--drivers/mmc/host/mmci.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c
index 50b5f9926f64..0726e59fd418 100644
--- a/drivers/mmc/host/mmci.c
+++ b/drivers/mmc/host/mmci.c
@@ -675,7 +675,8 @@ mmci_data_irq(struct mmci_host *host, struct mmc_data *data,
675 unsigned int status) 675 unsigned int status)
676{ 676{
677 /* First check for errors */ 677 /* First check for errors */
678 if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN|MCI_RXOVERRUN)) { 678 if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_STARTBITERR|
679 MCI_TXUNDERRUN|MCI_RXOVERRUN)) {
679 u32 remain, success; 680 u32 remain, success;
680 681
681 /* Terminate the DMA transfer */ 682 /* Terminate the DMA transfer */
@@ -754,8 +755,12 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd,
754 } 755 }
755 756
756 if (!cmd->data || cmd->error) { 757 if (!cmd->data || cmd->error) {
757 if (host->data) 758 if (host->data) {
759 /* Terminate the DMA transfer */
760 if (dma_inprogress(host))
761 mmci_dma_data_error(host);
758 mmci_stop_data(host); 762 mmci_stop_data(host);
763 }
759 mmci_request_end(host, cmd->mrq); 764 mmci_request_end(host, cmd->mrq);
760 } else if (!(cmd->data->flags & MMC_DATA_READ)) { 765 } else if (!(cmd->data->flags & MMC_DATA_READ)) {
761 mmci_start_data(host, cmd->data); 766 mmci_start_data(host, cmd->data);
@@ -955,8 +960,9 @@ static irqreturn_t mmci_irq(int irq, void *dev_id)
955 dev_dbg(mmc_dev(host->mmc), "irq0 (data+cmd) %08x\n", status); 960 dev_dbg(mmc_dev(host->mmc), "irq0 (data+cmd) %08x\n", status);
956 961
957 data = host->data; 962 data = host->data;
958 if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_TXUNDERRUN| 963 if (status & (MCI_DATACRCFAIL|MCI_DATATIMEOUT|MCI_STARTBITERR|
959 MCI_RXOVERRUN|MCI_DATAEND|MCI_DATABLOCKEND) && data) 964 MCI_TXUNDERRUN|MCI_RXOVERRUN|MCI_DATAEND|
965 MCI_DATABLOCKEND) && data)
960 mmci_data_irq(host, data, status); 966 mmci_data_irq(host, data, status);
961 967
962 cmd = host->cmd; 968 cmd = host->cmd;