diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-07-06 05:58:33 -0400 |
---|---|---|
committer | Chris Ball <cjb@laptop.org> | 2012-07-22 15:25:50 -0400 |
commit | 41b4e9a194f69b1c945038c559ea407a6b383e81 (patch) | |
tree | 5836b9416b754efaa52b6e6f65fc72140563fb01 /drivers/mmc/host/atmel-mci.c | |
parent | eb6d5ae1c918cefbfe06f6f96e1a75f2179d82ce (diff) |
mmc: atmel-mci: fix incorrect setting of host->data to NULL
Setting host->data to NULL is incorrect sequence in STATE_SENDING_STOP
state of FSM: This early setting leads to the skip of dma_unmap_sg()
in atmci_dma_cleanup() which is a bug.
Idea taken from dw_mmc by Seungwon Jeon.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Seungwon Jeon <tgih.jun@samsung.com>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Signed-off-by: Chris Ball <cjb@laptop.org>
Diffstat (limited to 'drivers/mmc/host/atmel-mci.c')
-rw-r--r-- | drivers/mmc/host/atmel-mci.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mmc/host/atmel-mci.c b/drivers/mmc/host/atmel-mci.c index f2c115e06438..84c4ac4d5192 100644 --- a/drivers/mmc/host/atmel-mci.c +++ b/drivers/mmc/host/atmel-mci.c | |||
@@ -1685,7 +1685,6 @@ static void atmci_tasklet_func(unsigned long priv) | |||
1685 | 1685 | ||
1686 | dev_dbg(&host->pdev->dev, "FSM: cmd ready\n"); | 1686 | dev_dbg(&host->pdev->dev, "FSM: cmd ready\n"); |
1687 | host->cmd = NULL; | 1687 | host->cmd = NULL; |
1688 | host->data = NULL; | ||
1689 | data->bytes_xfered = data->blocks * data->blksz; | 1688 | data->bytes_xfered = data->blocks * data->blksz; |
1690 | data->error = 0; | 1689 | data->error = 0; |
1691 | atmci_command_complete(host, mrq->stop); | 1690 | atmci_command_complete(host, mrq->stop); |
@@ -1699,6 +1698,7 @@ static void atmci_tasklet_func(unsigned long priv) | |||
1699 | atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY); | 1698 | atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY); |
1700 | state = STATE_WAITING_NOTBUSY; | 1699 | state = STATE_WAITING_NOTBUSY; |
1701 | } | 1700 | } |
1701 | host->data = NULL; | ||
1702 | break; | 1702 | break; |
1703 | 1703 | ||
1704 | case STATE_END_REQUEST: | 1704 | case STATE_END_REQUEST: |