From patchwork Fri Jul 10 12:43:02 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrian Hunter X-Patchwork-Id: 35007 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 n6ACgeD5014201 for ; Fri, 10 Jul 2009 12:42:43 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755515AbZGJMjn (ORCPT ); Fri, 10 Jul 2009 08:39:43 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755519AbZGJMjm (ORCPT ); Fri, 10 Jul 2009 08:39:42 -0400 Received: from smtp.nokia.com ([192.100.105.134]:19562 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755505AbZGJMjj (ORCPT ); Fri, 10 Jul 2009 08:39:39 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n6ACdHto012863; Fri, 10 Jul 2009 07:39:33 -0500 Received: from vaebh104.NOE.Nokia.com ([10.160.244.30]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 10 Jul 2009 15:39:30 +0300 Received: from mgw-da02.ext.nokia.com ([147.243.128.26]) by vaebh104.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Fri, 10 Jul 2009 15:39:28 +0300 Received: from [127.0.1.1] (esdhcp042131.research.nokia.com [172.21.42.131]) by mgw-da02.ext.nokia.com (Switch-3.2.6/Switch-3.2.6) with ESMTP id n6ACdKhO016215; Fri, 10 Jul 2009 15:39:21 +0300 From: Adrian Hunter To: Pierre Ossman Cc: Jarkko Lavinen , Denis Karpov , Adrian Hunter , linux-omap Mailing List , lkml Date: Fri, 10 Jul 2009 15:43:02 +0300 Message-Id: <20090710124302.1262.37406.sendpatchset@ahunter-tower> In-Reply-To: <20090710124004.1262.10422.sendpatchset@ahunter-tower> References: <20090710124004.1262.10422.sendpatchset@ahunter-tower> Subject: [PATCH 25/32] omap_hsmmc: cater for weird CMD6 behaviour X-OriginalArrivalTime: 10 Jul 2009 12:39:28.0393 (UTC) FILETIME=[7704B790:01CA015B] X-Nokia-AV: Clean Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org From 4ad1f699fad1f7132e5a6a7ad1a2a433accb88d4 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 315d1df..28563d6 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;