mmc: atmel-mci: abort transfer on timeout error
PATCH 1/1 mmc: atmel-mci: abort transfer on timeout error
From: Ludovic Desroches <[email protected]>
When a software timeout occurs, the transfer is not stopped. In DMA case, it causes DMA channel to be stuck because the transfer is still active causing following transfers to be queued but not computed.
--- drivers/mmc/host/atmel-mci.c | 7 +++++++ 1 file changed, 7 insertions(+)
drivers/mmc/host/atmel-mci.c +7 -0
@@ -582,6 +582,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 ;
Signature · 1 line
1.7.11.3
PATCH 1/1 mmc: atmel-mci: abort transfer on timeout error
On 09/09/2013 17:29, ludovic.desroches at atmel.com :
Quoted 8 lines
From: Ludovic Desroches <[email protected]>
When a software timeout occurs, the transfer is not stopped. In DMA case, it causes DMA channel to be stuck because the transfer is still active causing following transfers to be queued but not computed.
Cc <[email protected]> #3.9+Signed-off-by Ludovic Desroches <[email protected]>
Thanks.
Quoted 24 lines
Reported-by Alexander Morozov <[email protected]>--- drivers/mmc/host/atmel-mci.c | 7 +++++++ 1 file changed, 7 insertions(+)drivers/mmc/host/atmel-mci.c +7
-0@@ -582,6 +582,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 ;
Signature · 1 line
Nicolas Ferre
PATCH 1/1 mmc: atmel-mci: abort transfer on timeout error
Hi,
Quoted 7 lines · Nicolas Ferre
On 09/09/2013 17:29, ludovic.desroches at atmel.com :
Quoted 6 lines
From: Ludovic Desroches <[email protected]>
When a software timeout occurs, the transfer is not stopped. In DMA case, it causes DMA channel to be stuck because the transfer is still active causing following transfers to be queued but not computed.
Quoted 5 lines
Quoted 3 lines
Cc <[email protected]> #3.9+Signed-off-by Ludovic Desroches <[email protected]>Reported-by Alexander Morozov <[email protected]>Acked-by Nicolas Ferre <[email protected]>
Thanks, pushed to mmc-next for 3.12.
- Chris.
Signature · 1 line
Chris Ball <[email protected]> <http://printf.net/>