From patchwork Wed Sep 9 11:59:34 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 46380 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 n89C02sx008657 for ; Wed, 9 Sep 2009 12:00:02 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753213AbZIIL74 (ORCPT ); Wed, 9 Sep 2009 07:59:56 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753164AbZIIL74 (ORCPT ); Wed, 9 Sep 2009 07:59:56 -0400 Received: from smtp.nokia.com ([192.100.122.233]:43137 "EHLO mgw-mx06.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753047AbZIIL7y (ORCPT ); Wed, 9 Sep 2009 07:59:54 -0400 Received: from esebh105.NOE.Nokia.com (esebh105.ntc.nokia.com [172.21.138.211]) by mgw-mx06.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n89BwWnB007220; Wed, 9 Sep 2009 14:58:59 +0300 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh105.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Wed, 9 Sep 2009 14:59:10 +0300 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Wed, 9 Sep 2009 14:59:10 +0300 Received: from [127.0.1.1] (esdhcp041173.research.nokia.com [172.21.41.173]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n89Bx6AW022381; Wed, 9 Sep 2009 14:59:06 +0300 From: Adrian Hunter To: Andrew Morton Cc: Jarkko Lavinen , Adrian Hunter , Madhusudhan Chikkature , linux-mmc Mailing List , linux-omap Mailing List , Pierre Ossman , Matt Fleming Date: Wed, 09 Sep 2009 14:59:34 +0300 Message-Id: <20090909115934.12833.48915.sendpatchset@ahunter-laptop> In-Reply-To: <20090909115633.12833.39619.sendpatchset@ahunter-laptop> References: <20090909115633.12833.39619.sendpatchset@ahunter-laptop> Subject: [PATCH V3 24/30] omap_hsmmc: cater for weird CMD6 behaviour X-OriginalArrivalTime: 09 Sep 2009 11:59:10.0423 (UTC) FILETIME=[F0FE8670:01CA3144] Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From 60731c064681d57c84ce563274f3f5869c598cce Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Sat, 16 May 2009 10:05:40 +0300 Subject: [PATCH] omap_hsmmc: cater for weird CMD6 behaviour Sometimes the controller unexpectedly produces a TC (transfer complete) interrupt before the CC (command complete) interrupt for command 6 (SWITCH). This is a problem because the CC interrupt can get mixed up with the next request. Add a hack for CMD6. Signed-off-by: Adrian Hunter --- drivers/mmc/host/omap_hsmmc.c | 7 +++++++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/host/omap_hsmmc.c b/drivers/mmc/host/omap_hsmmc.c index 42f3aad..205cc3a 100644 --- a/drivers/mmc/host/omap_hsmmc.c +++ b/drivers/mmc/host/omap_hsmmc.c @@ -474,6 +474,13 @@ mmc_omap_xfer_done(struct mmc_omap_host *host, struct mmc_data *data) if (!data) { struct mmc_request *mrq = host->mrq; + /* TC before CC from CMD6 - don't know why, but it happens */ + if (host->cmd && host->cmd->opcode == 6 && + host->response_busy) { + host->response_busy = 0; + return; + } + host->mrq = NULL; mmc_request_done(host->mmc, mrq); return;