diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/mmc/host/msm_sdcc.c | 15 | ||||
-rw-r--r-- | drivers/mmc/host/msm_sdcc.h | 1 |
2 files changed, 4 insertions, 12 deletions
diff --git a/drivers/mmc/host/msm_sdcc.c b/drivers/mmc/host/msm_sdcc.c index 9badc51bc4db..5decfd0bd61d 100644 --- a/drivers/mmc/host/msm_sdcc.c +++ b/drivers/mmc/host/msm_sdcc.c | |||
@@ -190,7 +190,7 @@ static void | |||
190 | msmsdcc_stop_data(struct msmsdcc_host *host) | 190 | msmsdcc_stop_data(struct msmsdcc_host *host) |
191 | { | 191 | { |
192 | host->curr.data = NULL; | 192 | host->curr.data = NULL; |
193 | host->curr.got_dataend = host->curr.got_datablkend = 0; | 193 | host->curr.got_dataend = 0; |
194 | } | 194 | } |
195 | 195 | ||
196 | uint32_t msmsdcc_fifo_addr(struct msmsdcc_host *host) | 196 | uint32_t msmsdcc_fifo_addr(struct msmsdcc_host *host) |
@@ -277,8 +277,7 @@ msmsdcc_dma_complete_tlet(unsigned long data) | |||
277 | host->dma.sg = NULL; | 277 | host->dma.sg = NULL; |
278 | host->dma.busy = 0; | 278 | host->dma.busy = 0; |
279 | 279 | ||
280 | if ((host->curr.got_dataend && host->curr.got_datablkend) | 280 | if (host->curr.got_dataend || mrq->data->error) { |
281 | || mrq->data->error) { | ||
282 | 281 | ||
283 | /* | 282 | /* |
284 | * If we've already gotten our DATAEND / DATABLKEND | 283 | * If we've already gotten our DATAEND / DATABLKEND |
@@ -506,7 +505,6 @@ msmsdcc_start_data(struct msmsdcc_host *host, struct mmc_data *data, | |||
506 | host->curr.xfer_remain = host->curr.xfer_size; | 505 | host->curr.xfer_remain = host->curr.xfer_size; |
507 | host->curr.data_xfered = 0; | 506 | host->curr.data_xfered = 0; |
508 | host->curr.got_dataend = 0; | 507 | host->curr.got_dataend = 0; |
509 | host->curr.got_datablkend = 0; | ||
510 | 508 | ||
511 | memset(&host->pio, 0, sizeof(host->pio)); | 509 | memset(&host->pio, 0, sizeof(host->pio)); |
512 | 510 | ||
@@ -827,14 +825,10 @@ msmsdcc_handle_irq_data(struct msmsdcc_host *host, u32 status, | |||
827 | if (!host->curr.got_dataend && (status & MCI_DATAEND)) | 825 | if (!host->curr.got_dataend && (status & MCI_DATAEND)) |
828 | host->curr.got_dataend = 1; | 826 | host->curr.got_dataend = 1; |
829 | 827 | ||
830 | if (!host->curr.got_datablkend && (status & MCI_DATABLOCKEND)) | ||
831 | host->curr.got_datablkend = 1; | ||
832 | |||
833 | /* | 828 | /* |
834 | * If DMA is still in progress, we complete via the completion handler | 829 | * If DMA is still in progress, we complete via the completion handler |
835 | */ | 830 | */ |
836 | if (host->curr.got_dataend && host->curr.got_datablkend && | 831 | if (host->curr.got_dataend && !host->dma.busy) { |
837 | !host->dma.busy) { | ||
838 | /* | 832 | /* |
839 | * There appears to be an issue in the controller where | 833 | * There appears to be an issue in the controller where |
840 | * if you request a small block transfer (< fifo size), | 834 | * if you request a small block transfer (< fifo size), |
@@ -871,8 +865,7 @@ msmsdcc_irq(int irq, void *dev_id) | |||
871 | 865 | ||
872 | do { | 866 | do { |
873 | status = msmsdcc_readl(host, MMCISTATUS); | 867 | status = msmsdcc_readl(host, MMCISTATUS); |
874 | status &= (msmsdcc_readl(host, MMCIMASK0) | | 868 | status &= msmsdcc_readl(host, MMCIMASK0); |
875 | MCI_DATABLOCKENDMASK); | ||
876 | msmsdcc_writel(host, status, MMCICLEAR); | 869 | msmsdcc_writel(host, status, MMCICLEAR); |
877 | 870 | ||
878 | if (status & MCI_SDIOINTR) | 871 | if (status & MCI_SDIOINTR) |
diff --git a/drivers/mmc/host/msm_sdcc.h b/drivers/mmc/host/msm_sdcc.h index e0579a1cc9e5..939557af266d 100644 --- a/drivers/mmc/host/msm_sdcc.h +++ b/drivers/mmc/host/msm_sdcc.h | |||
@@ -190,7 +190,6 @@ struct msmsdcc_curr_req { | |||
190 | unsigned int xfer_remain; /* Bytes remaining to send */ | 190 | unsigned int xfer_remain; /* Bytes remaining to send */ |
191 | unsigned int data_xfered; /* Bytes acked by BLKEND irq */ | 191 | unsigned int data_xfered; /* Bytes acked by BLKEND irq */ |
192 | int got_dataend; | 192 | int got_dataend; |
193 | int got_datablkend; | ||
194 | int user_pages; | 193 | int user_pages; |
195 | }; | 194 | }; |
196 | 195 | ||