public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: ludovic.desroches@atmel•com (ludovic.desroches)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] mmc: atmel-mci: fix incorrect setting of host->data to NULL
Date: Fri, 6 Jul 2012 12:04:33 +0200	[thread overview]
Message-ID: <4FF6B831.5060005@atmel.com> (raw)
In-Reply-To: <1341568713-8869-1-git-send-email-nicolas.ferre@atmel.com>

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:
>

  reply	other threads:[~2012-07-06 10:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
2012-07-10  3:18   ` Chris Ball

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4FF6B831.5060005@atmel.com \
    --to=ludovic.desroches@atmel$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox