diff options
author | Javier Martin <javier.martin@vista-silicon.com> | 2012-10-30 16:54:07 +0100 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-12-06 13:54:38 -0500 |
commit | 2cb535529d52658613a2138677f5e497e633bead (patch) | |
tree | bf9c72400c580160c42cf8caea4515b6c6cd42ec /drivers/mmc | |
parent | 49480cf2c29ffd2b6cb5213eaf8995bd1e16a345 (diff) | |
download | linux-2cb535529d52658613a2138677f5e497e633bead.tar.bz2 |
mmc: mxcmmc: fix SD cards not being detected sometimes.
When a SD card is initialized some data transfers of 64 and 8 bytes
are issued. It seems the DMA has some problems dealing with these kind
of "short" transfers, leading sometimes to the SD card not being detected.
In order to solve this problem, do not use DMA for transfer sizes lower
than the sector size.
Signed-off-by: Javier Martin <javier.martin@vista-silicon.com>
Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/mxcmmc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/mxcmmc.c b/drivers/mmc/host/mxcmmc.c index 6290b7f1ccfe..29e680f193a0 100644 --- a/drivers/mmc/host/mxcmmc.c +++ b/drivers/mmc/host/mxcmmc.c @@ -240,7 +240,7 @@ static int mxcmci_setup_data(struct mxcmci_host *host, struct mmc_data *data) return 0; for_each_sg(data->sg, sg, data->sg_len, i) { - if (sg->offset & 3 || sg->length & 3) { + if (sg->offset & 3 || sg->length & 3 || sg->length < 512) { host->do_dma = 0; return 0; } |