diff options
author | Mark Brown <broonie@linaro.org> | 2013-12-05 10:16:50 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-12-05 10:16:50 +0000 |
commit | a8eb5f1e4b10d8b7992ed0e6c0915687339201c3 (patch) | |
tree | 69dbf24ffe53feb88b2189d22f6092314daa8231 /drivers/mmc | |
parent | 302774e6db8e9845bf065a781237a2bb808186bb (diff) | |
parent | dffe2a3eed105c631500778dfaba0998d7bf8512 (diff) |
Merge branch 'linux-linaro-lsk' into linux-linaro-lsk-android
Conflicts (add/add):
drivers/input/evdev.c
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index aca59d93d5a..b5c95043f7e 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c @@ -584,6 +584,13 @@ static void atmci_timeout_timer(unsigned long data) if (host->mrq->cmd->data) { host->mrq->cmd->data->error = -ETIMEDOUT; host->data = NULL; + /* + * With some SDIO modules, sometimes DMA transfer hangs. If + * stop_transfer() is not called then the DMA request is not + * removed, following ones are queued and never computed. + */ + if (host->state == STATE_DATA_XFER) + host->stop_transfer(host); } else { host->mrq->cmd->error = -ETIMEDOUT; host->cmd = NULL; @@ -1787,12 +1794,14 @@ static void atmci_tasklet_func(unsigned long priv) if (unlikely(status)) { host->stop_transfer(host); host->data = NULL; - if (status & ATMCI_DTOE) { - data->error = -ETIMEDOUT; - } else if (status & ATMCI_DCRCE) { - data->error = -EILSEQ; - } else { - data->error = -EIO; + if (data) { + if (status & ATMCI_DTOE) { + data->error = -ETIMEDOUT; + } else if (status & ATMCI_DCRCE) { + data->error = -EILSEQ; + } else { + data->error = -EIO; + } } } |