From patchwork Mon Jul 27 14:22:05 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rajashekhara, Sudhakar" X-Patchwork-Id: 37546 Received: from devils.ext.ti.com (devils.ext.ti.com [198.47.26.153]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n6RFFWPM014455 for ; Mon, 27 Jul 2009 15:15:33 GMT Received: from dlep34.itg.ti.com ([157.170.170.115]) by devils.ext.ti.com (8.13.7/8.13.7) with ESMTP id n6RFFRZp015975 for ; Mon, 27 Jul 2009 10:15:32 -0500 Received: from linux.omap.com (localhost [127.0.0.1]) by dlep34.itg.ti.com (8.13.7/8.13.7) with ESMTP id n6RFFRKA012209 for ; Mon, 27 Jul 2009 10:15:27 -0500 (CDT) Received: from linux.omap.com (localhost [127.0.0.1]) by linux.omap.com (Postfix) with ESMTP id DFD2F80833 for ; Mon, 27 Jul 2009 10:14:46 -0500 (CDT) X-Original-To: davinci-linux-open-source@linux.davincidsp.com Delivered-To: davinci-linux-open-source@linux.davincidsp.com Received: from dflp53.itg.ti.com (dflp53.itg.ti.com [128.247.5.6]) by linux.omap.com (Postfix) with ESMTP id 2C18180626 for ; Mon, 27 Jul 2009 10:14:32 -0500 (CDT) Received: from tidmzi-ftp.india.ext.ti.com (localhost [127.0.0.1]) by dflp53.itg.ti.com (8.13.8/8.13.8) with SMTP id n6RFEU2b002280 for ; Mon, 27 Jul 2009 10:14:31 -0500 (CDT) Received: from symphonyindia.ti.com (symphony-ftp [192.168.247.11]) by tidmzi-ftp.india.ext.ti.com (Postfix) with SMTP id 505FC3886B for ; Mon, 27 Jul 2009 20:41:41 +0530 (IST) Received: from localhost.localdomain ([192.168.247.76]) by symphonyindia.ti.com (8.13.1/8.12.10) with ESMTP id n6RF7qlE022434; Mon, 27 Jul 2009 20:37:52 +0530 From: Sudhakar Rajashekhara To: davinci-linux-open-source@linux.davincidsp.com Date: Mon, 27 Jul 2009 10:22:05 -0400 Message-Id: <1248704525-12806-1-git-send-email-sudhakar.raj@ti.com> X-Mailer: git-send-email 1.5.6 Cc: Subject: [PATCH] mmc: fix mmc_davinci_xfer_done() function X-BeenThere: davinci-linux-open-source@linux.davincidsp.com X-Mailman-Version: 2.1.4 Precedence: list List-Id: davinci-linux-open-source.linux.davincidsp.com List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com Errors-To: davinci-linux-open-source-bounces+patchwork-davinci=patchwork.kernel.org@linux.davincidsp.com 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 Acked-by: Vipin Bhandari --- 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(-) 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);