From patchwork Thu Mar 12 16:22:59 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 11405 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n2CGNSWL004862 for ; Thu, 12 Mar 2009 16:23:29 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757457AbZCLQXP (ORCPT ); Thu, 12 Mar 2009 12:23:15 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757452AbZCLQXO (ORCPT ); Thu, 12 Mar 2009 12:23:14 -0400 Received: from smtp.nokia.com ([192.100.122.233]:17311 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757411AbZCLQXK (ORCPT ); Thu, 12 Mar 2009 12:23:10 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx06.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n2CGMlq9005383; Thu, 12 Mar 2009 18:22:58 +0200 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 12 Mar 2009 18:22:44 +0200 Received: from mgw-int02.ntc.nokia.com ([172.21.143.97]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Thu, 12 Mar 2009 18:22:34 +0200 Received: from [127.0.1.1] (esdhcp041224.research.nokia.com [172.21.41.224]) by mgw-int02.ntc.nokia.com (Switch-3.2.5/Switch-3.2.5) with ESMTP id n2CGMXNt014870; Thu, 12 Mar 2009 18:22:33 +0200 From: Adrian Hunter To: Pierre Ossman Cc: Jarkko Lavinen , Adrian Hunter , Grazvydas Ignotas , David Brownell , linux-omap Mailing List , Tony Lindgren , lkml Date: Thu, 12 Mar 2009 18:22:59 +0200 Message-Id: <20090312162259.19421.70608.sendpatchset@ahunter-laptop> In-Reply-To: <20090312162252.19421.34019.sendpatchset@ahunter-laptop> References: <20090312162252.19421.34019.sendpatchset@ahunter-laptop> Subject: [PATCH 1/10] OMAP: HSMMC: Do dma cleanup also with data CRC errors X-OriginalArrivalTime: 12 Mar 2009 16:22:34.0942 (UTC) FILETIME=[C073FDE0:01C9A32E] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From 93cfc8673d2f41527c1786de8f061bef88f9ac28 Mon Sep 17 00:00:00 2001 From: Jarkko Lavinen Date: Fri, 5 Dec 2008 12:31:46 +0200 Subject: [PATCH] OMAP: HSMMC: Do dma cleanup also with data CRC errors Signed-off-by: Jarkko Lavinen --- drivers/mmc/host/omap_hsmmc.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 576bfa7..5ff2ca2 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -332,9 +332,9 @@ mmc_omap_cmd_done(struct mmc_omap_host *host, struct mmc_command *cmd) /* * DMA clean up for command errors */ -static void mmc_dma_cleanup(struct mmc_omap_host *host) +static void mmc_dma_cleanup(struct mmc_omap_host *host, int errno) { - host->data->error = -ETIMEDOUT; + host->data->error = errno; if (host->use_dma && host->dma_ch != -1) { dma_unmap_sg(mmc_dev(host->mmc), host->data->sg, host->dma_len, @@ -439,7 +439,7 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) end_cmd = 1; } if (host->data) { - mmc_dma_cleanup(host); + mmc_dma_cleanup(host, -ETIMEDOUT); mmc_omap_reset_controller_fsm(host, SRD); } } @@ -447,9 +447,9 @@ static irqreturn_t mmc_omap_irq(int irq, void *dev_id) (status & DATA_CRC)) { if (host->data) { if (status & DATA_TIMEOUT) - mmc_dma_cleanup(host); + mmc_dma_cleanup(host, -ETIMEDOUT); else - host->data->error = -EILSEQ; + mmc_dma_cleanup(host, -EILSEQ); mmc_omap_reset_controller_fsm(host, SRD); end_trans = 1; }