* [PATCH] mmc: atmel-mci: fix incorrect setting of host->data to NULL
@ 2012-07-06 9:58 Nicolas Ferre
2012-07-06 10:04 ` ludovic.desroches
0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Ferre @ 2012-07-06 9:58 UTC (permalink / raw)
To: linux-mmc, Ludovic.Desroches
Cc: Seungwon Jeon, Nicolas Ferre, linux-kernel, linux-arm-kernel
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 form dw_mmc by Seungwon Jeon.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Seungwon Jeon <tgih.jun@samsung.com>
---
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 78e5326..2ce109d 100644
--- a/drivers/mmc/host/atmel-mci.c
+++ b/drivers/mmc/host/atmel-mci.c
@@ -1860,7 +1860,6 @@ static void atmci_tasklet_func(unsigned long priv)
dev_dbg(&host->pdev->dev, "FSM: cmd ready\n");
host->cmd = NULL;
- host->data = NULL;
data->bytes_xfered = data->blocks * data->blksz;
data->error = 0;
atmci_command_complete(host, mrq->stop);
@@ -1874,6 +1873,7 @@ static void atmci_tasklet_func(unsigned long priv)
atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY);
state = STATE_WAITING_NOTBUSY;
}
+ host->data = NULL;
break;
case STATE_END_REQUEST:
--
1.7.5.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: atmel-mci: fix incorrect setting of host->data to NULL
2012-07-06 9:58 [PATCH] mmc: atmel-mci: fix incorrect setting of host->data to NULL Nicolas Ferre
@ 2012-07-06 10:04 ` ludovic.desroches
2012-07-10 3:18 ` Chris Ball
0 siblings, 1 reply; 3+ messages in thread
From: ludovic.desroches @ 2012-07-06 10:04 UTC (permalink / raw)
To: Nicolas Ferre
Cc: Seungwon Jeon, Ludovic.Desroches, linux-mmc, linux-kernel,
linux-arm-kernel
Le 07/06/2012 11:58 AM, Nicolas Ferre a écrit :
> 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 form 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>
Thanks
> ---
> 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 78e5326..2ce109d 100644
> --- a/drivers/mmc/host/atmel-mci.c
> +++ b/drivers/mmc/host/atmel-mci.c
> @@ -1860,7 +1860,6 @@ static void atmci_tasklet_func(unsigned long priv)
>
> dev_dbg(&host->pdev->dev, "FSM: cmd ready\n");
> host->cmd = NULL;
> - host->data = NULL;
> data->bytes_xfered = data->blocks * data->blksz;
> data->error = 0;
> atmci_command_complete(host, mrq->stop);
> @@ -1874,6 +1873,7 @@ static void atmci_tasklet_func(unsigned long priv)
> atmci_writel(host, ATMCI_IER, ATMCI_NOTBUSY);
> state = STATE_WAITING_NOTBUSY;
> }
> + host->data = NULL;
> break;
>
> case STATE_END_REQUEST:
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mmc: atmel-mci: fix incorrect setting of host->data to NULL
2012-07-06 10:04 ` ludovic.desroches
@ 2012-07-10 3:18 ` Chris Ball
0 siblings, 0 replies; 3+ messages in thread
From: Chris Ball @ 2012-07-10 3:18 UTC (permalink / raw)
To: ludovic.desroches
Cc: Seungwon Jeon, linux-mmc, Nicolas Ferre, linux-kernel,
linux-arm-kernel
Hi,
On Fri, Jul 06 2012, ludovic.desroches wrote:
> Le 07/06/2012 11:58 AM, Nicolas Ferre a écrit :
>> 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 form 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>
Thanks, pushed to mmc-next for 3.6.
- Chris.
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-07-10 3:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-06 9:58 [PATCH] mmc: atmel-mci: fix incorrect setting of host->data to NULL Nicolas Ferre
2012-07-06 10:04 ` ludovic.desroches
2012-07-10 3:18 ` Chris Ball
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox