diff mbox

mmc: fix mmc_davinci_xfer_done() function

Message ID 1248704525-12806-1-git-send-email-sudhakar.raj@ti.com (mailing list archive)
State Accepted
Headers show

Commit Message

Rajashekhara, Sudhakar July 27, 2009, 2:22 p.m. UTC
In mmc_davinci_xfer_done() function data direction variable
is being modified before the call to davinci_abort_dma().
But inside the davinci_abort_dma() function data direction
variable is being checked to select the channel to abort.

Without this patch, davinci_abort_dma() function always
aborts, TX channel dma.

Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
Acked-by: Vipin Bhandari <vipin.bhandari@ti.com>
---
 This patch applies to davinci git.

 This patch will be re-submitted for mainline kernel once
 Vipin's MMC support patch is accepted there.

 If Vipin needs to rework on that patch, then this patch will
 be folded with that.

 drivers/mmc/host/davinci_mmc.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Kevin Hilman Aug. 7, 2009, 11:08 p.m. UTC | #1
Sudhakar Rajashekhara <sudhakar.raj@ti.com> writes:

> In mmc_davinci_xfer_done() function data direction variable
> is being modified before the call to davinci_abort_dma().
> But inside the davinci_abort_dma() function data direction
> variable is being checked to select the channel to abort.
>
> Without this patch, davinci_abort_dma() function always
> aborts, TX channel dma.
>
> Signed-off-by: Sudhakar Rajashekhara <sudhakar.raj@ti.com>
> Acked-by: Vipin Bhandari <vipin.bhandari@ti.com>

Thanks, pushing today.

> ---
>  This patch applies to davinci git.
>
>  This patch will be re-submitted for mainline kernel once
>  Vipin's MMC support patch is accepted there.
>
>  If Vipin needs to rework on that patch, then this patch will
>  be folded with that.

ok.

Kevin

>  drivers/mmc/host/davinci_mmc.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
> index 8907b72..6c76f64 100644
> --- a/drivers/mmc/host/davinci_mmc.c
> +++ b/drivers/mmc/host/davinci_mmc.c
> @@ -827,7 +827,6 @@ static void
>  mmc_davinci_xfer_done(struct mmc_davinci_host *host, struct mmc_data *data)
>  {
>  	host->data = NULL;
> -	host->data_dir = DAVINCI_MMC_DATADIR_NONE;
>  
>  	if (host->do_dma) {
>  		davinci_abort_dma(host);
> @@ -838,6 +837,7 @@ mmc_davinci_xfer_done(struct mmc_davinci_host *host, struct mmc_data *data)
>  			     : DMA_FROM_DEVICE);
>  		host->do_dma = false;
>  	}
> +	host->data_dir = DAVINCI_MMC_DATADIR_NONE;
>  
>  	if (!data->stop || (host->cmd && host->cmd->error)) {
>  		mmc_request_done(host->mmc, data->mrq);
> -- 
> 1.5.6
>
> _______________________________________________
> Davinci-linux-open-source mailing list
> Davinci-linux-open-source@linux.davincidsp.com
> http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
diff mbox

Patch

diff --git a/drivers/mmc/host/davinci_mmc.c b/drivers/mmc/host/davinci_mmc.c
index 8907b72..6c76f64 100644
--- a/drivers/mmc/host/davinci_mmc.c
+++ b/drivers/mmc/host/davinci_mmc.c
@@ -827,7 +827,6 @@  static void
 mmc_davinci_xfer_done(struct mmc_davinci_host *host, struct mmc_data *data)
 {
 	host->data = NULL;
-	host->data_dir = DAVINCI_MMC_DATADIR_NONE;
 
 	if (host->do_dma) {
 		davinci_abort_dma(host);
@@ -838,6 +837,7 @@  mmc_davinci_xfer_done(struct mmc_davinci_host *host, struct mmc_data *data)
 			     : DMA_FROM_DEVICE);
 		host->do_dma = false;
 	}
+	host->data_dir = DAVINCI_MMC_DATADIR_NONE;
 
 	if (!data->stop || (host->cmd && host->cmd->error)) {
 		mmc_request_done(host->mmc, data->mrq);