From patchwork Tue Nov 29 14:51:26 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulf Hansson X-Patchwork-Id: 5378 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id 1339A23E03 for ; Tue, 29 Nov 2011 14:52:00 +0000 (UTC) Received: from mail-lpp01m010-f52.google.com (mail-lpp01m010-f52.google.com [209.85.215.52]) by fiordland.canonical.com (Postfix) with ESMTP id E7EE1A1809F for ; Tue, 29 Nov 2011 14:51:59 +0000 (UTC) Received: by laah2 with SMTP id h2so1370752laa.11 for ; Tue, 29 Nov 2011 06:51:59 -0800 (PST) Received: by 10.152.110.130 with SMTP id ia2mr10570985lab.26.1322578319412; Tue, 29 Nov 2011 06:51:59 -0800 (PST) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.152.41.198 with SMTP id h6cs4709lal; Tue, 29 Nov 2011 06:51:54 -0800 (PST) Received: by 10.213.10.193 with SMTP id q1mr661005ebq.115.1322578311833; Tue, 29 Nov 2011 06:51:51 -0800 (PST) Received: from eu1sys200aog118.obsmtp.com (eu1sys200aog118.obsmtp.com. [207.126.144.145]) by mx.google.com with SMTP id k56si6708210eek.1.2011.11.29.06.51.46 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 29 Nov 2011 06:51:51 -0800 (PST) Received-SPF: neutral (google.com: 207.126.144.145 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) client-ip=207.126.144.145; Authentication-Results: mx.google.com; spf=neutral (google.com: 207.126.144.145 is neither permitted nor denied by best guess record for domain of ulf.hansson@stericsson.com) smtp.mail=ulf.hansson@stericsson.com Received: from beta.dmz-ap.st.com ([138.198.100.35]) (using TLSv1) by eu1sys200aob118.postini.com ([207.126.147.11]) with SMTP ID DSNKTtTxfqmNkYhjCY0W2ZjH9whMZ8Dzp13q@postini.com; Tue, 29 Nov 2011 14:51:51 UTC Received: from zeta.dmz-ap.st.com (ns6.st.com [138.198.234.13]) by beta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 0BFA26F; Tue, 29 Nov 2011 14:43:11 +0000 (GMT) Received: from relay2.stm.gmessaging.net (unknown [10.230.100.18]) by zeta.dmz-ap.st.com (STMicroelectronics) with ESMTP id 68A31874; Tue, 29 Nov 2011 14:51:37 +0000 (GMT) Received: from exdcvycastm022.EQ1STM.local (alteon-source-exch [10.230.100.61]) (using TLSv1 with cipher RC4-MD5 (128/128 bits)) (Client CN "exdcvycastm022", Issuer "exdcvycastm022" (not verified)) by relay2.stm.gmessaging.net (Postfix) with ESMTPS id EBE21A807B; Tue, 29 Nov 2011 15:51:30 +0100 (CET) Received: from localhost.localdomain (10.230.100.153) by smtp.stericsson.com (10.230.100.30) with Microsoft SMTP Server (TLS) id 8.3.83.0; Tue, 29 Nov 2011 15:51:36 +0100 From: Ulf Hansson To: , Cc: Russell King , Ulf Hansson , Lee Jones , Per Forlin Subject: [PATCH] mmc: mmci: Fixup error handling for dma Date: Tue, 29 Nov 2011 15:51:26 +0100 Message-ID: <1322578286-18727-1-git-send-email-ulf.hansson@stericsson.com> X-Mailer: git-send-email 1.7.5.4 MIME-Version: 1.0 When getting a cmd irq during an ongoing data transfer with dma, the dma job were never terminated. This is now corrected. Signed-off-by: Ulf Hansson Signed-off-by: Per Forlin --- drivers/mmc/host/mmci.c | 6 +++++- 1 files changed, 5 insertions(+), 1 deletions(-) diff --git a/drivers/mmc/host/mmci.c b/drivers/mmc/host/mmci.c index e900f51..62ad649 100644 --- a/drivers/mmc/host/mmci.c +++ b/drivers/mmc/host/mmci.c @@ -761,8 +761,12 @@ mmci_cmd_irq(struct mmci_host *host, struct mmc_command *cmd, } if (!cmd->data || cmd->error) { - if (host->data) + if (host->data) { + /* Terminate the DMA transfer */ + if (dma_inprogress(host)) + mmci_dma_data_error(host); mmci_stop_data(host); + } mmci_request_end(host, cmd->mrq); } else if (!(cmd->data->flags & MMC_DATA_READ)) { mmci_start_data(host, cmd->data);