aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mmc/host/omap_hsmmc.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c
index 9599dd126ac8..f588deff8b2c 100644
--- a/drivers/mmc/host/omap_hsmmc.c
+++ b/drivers/mmc/host/omap_hsmmc.c
@@ -878,7 +878,7 @@ mmc_omap_start_dma_transfer(struct mmc_omap_host *host, struct mmc_request *req)
878 struct mmc_data *data = req->data; 878 struct mmc_data *data = req->data;
879 879
880 /* Sanity check: all the SG entries must be aligned by block size. */ 880 /* Sanity check: all the SG entries must be aligned by block size. */
881 for (i = 0; i < host->dma_len; i++) { 881 for (i = 0; i < data->sg_len; i++) {
882 struct scatterlist *sgl; 882 struct scatterlist *sgl;
883 883
884 sgl = data->sg + i; 884 sgl = data->sg + i;
@@ -1021,10 +1021,20 @@ static int omap_mmc_disable(struct mmc_host *mmc, int lazy)
1021static void omap_mmc_request(struct mmc_host *mmc, struct mmc_request *req) 1021static void omap_mmc_request(struct mmc_host *mmc, struct mmc_request *req)
1022{ 1022{
1023 struct mmc_omap_host *host = mmc_priv(mmc); 1023 struct mmc_omap_host *host = mmc_priv(mmc);
1024 int err;
1024 1025
1025 WARN_ON(host->mrq != NULL); 1026 WARN_ON(host->mrq != NULL);
1026 host->mrq = req; 1027 host->mrq = req;
1027 mmc_omap_prepare_data(host, req); 1028 err = mmc_omap_prepare_data(host, req);
1029 if (err) {
1030 req->cmd->error = err;
1031 if (req->data)
1032 req->data->error = err;
1033 host->mrq = NULL;
1034 mmc_request_done(mmc, req);
1035 return;
1036 }
1037
1028 mmc_omap_start_command(host, req->cmd, req->data); 1038 mmc_omap_start_command(host, req->cmd, req->data);
1029} 1039}
1030 1040