|
@@ -496,15 +496,16 @@ static void dw_mci_submit_data(struct dw_mci *host, struct mmc_data *data)
|
|
host->sg = NULL;
|
|
host->sg = NULL;
|
|
host->data = data;
|
|
host->data = data;
|
|
|
|
|
|
|
|
+ if (data->flags & MMC_DATA_READ)
|
|
|
|
+ host->dir_status = DW_MCI_RECV_STATUS;
|
|
|
|
+ else
|
|
|
|
+ host->dir_status = DW_MCI_SEND_STATUS;
|
|
|
|
+
|
|
if (dw_mci_submit_data_dma(host, data)) {
|
|
if (dw_mci_submit_data_dma(host, data)) {
|
|
host->sg = data->sg;
|
|
host->sg = data->sg;
|
|
host->pio_offset = 0;
|
|
host->pio_offset = 0;
|
|
host->part_buf_start = 0;
|
|
host->part_buf_start = 0;
|
|
host->part_buf_count = 0;
|
|
host->part_buf_count = 0;
|
|
- if (data->flags & MMC_DATA_READ)
|
|
|
|
- host->dir_status = DW_MCI_RECV_STATUS;
|
|
|
|
- else
|
|
|
|
- host->dir_status = DW_MCI_SEND_STATUS;
|
|
|
|
|
|
|
|
mci_writel(host, RINTSTS, SDMMC_INT_TXDR | SDMMC_INT_RXDR);
|
|
mci_writel(host, RINTSTS, SDMMC_INT_TXDR | SDMMC_INT_RXDR);
|
|
temp = mci_readl(host, INTMASK);
|
|
temp = mci_readl(host, INTMASK);
|
|
@@ -911,6 +912,16 @@ static void dw_mci_tasklet_func(unsigned long priv)
|
|
data->error = -ETIMEDOUT;
|
|
data->error = -ETIMEDOUT;
|
|
} else if (status & SDMMC_INT_DCRC) {
|
|
} else if (status & SDMMC_INT_DCRC) {
|
|
data->error = -EILSEQ;
|
|
data->error = -EILSEQ;
|
|
|
|
+ } else if (status & SDMMC_INT_EBE &&
|
|
|
|
+ host->dir_status ==
|
|
|
|
+ DW_MCI_SEND_STATUS) {
|
|
|
|
+ /*
|
|
|
|
+ * No data CRC status was returned.
|
|
|
|
+ * The number of bytes transferred will
|
|
|
|
+ * be exaggerated in PIO mode.
|
|
|
|
+ */
|
|
|
|
+ data->bytes_xfered = 0;
|
|
|
|
+ data->error = -ETIMEDOUT;
|
|
} else {
|
|
} else {
|
|
dev_err(&host->pdev->dev,
|
|
dev_err(&host->pdev->dev,
|
|
"data FIFO error "
|
|
"data FIFO error "
|