From patchwork Tue Jul 3 22:13:39 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Drake X-Patchwork-Id: 1153341 Return-Path: X-Original-To: patchwork-linux-mmc@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C75D0DF235 for ; Tue, 3 Jul 2012 22:13:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756723Ab2GCWNo (ORCPT ); Tue, 3 Jul 2012 18:13:44 -0400 Received: from mtaout02-winn.ispmail.ntl.com ([81.103.221.48]:49344 "EHLO mtaout02-winn.ispmail.ntl.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756313Ab2GCWNo (ORCPT ); Tue, 3 Jul 2012 18:13:44 -0400 Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20120703221342.SIMR14795.mtaout02-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com>; Tue, 3 Jul 2012 23:13:42 +0100 Received: from zog.reactivated.net ([86.14.215.141]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.3.00.04.00 201-2196-133-20080908) with ESMTP id <20120703221342.XDVZ3795.aamtaout02-winn.ispmail.ntl.com@zog.reactivated.net>; Tue, 3 Jul 2012 23:13:42 +0100 Received: by zog.reactivated.net (Postfix, from userid 1000) id 221729D401E; Tue, 3 Jul 2012 23:13:39 +0100 (BST) From: Daniel Drake To: cjb@laptop.org Cc: linux-mmc@vger.kernel.org Subject: [PATCH] sdhci-pci: CaFe has broken card detection Message-Id: <20120703221340.221729D401E@zog.reactivated.net> Date: Tue, 3 Jul 2012 23:13:39 +0100 (BST) X-Cloudmark-Analysis: v=1.1 cv=R50lirqlHffDPPkwUlkuVa99MrvKdVWo//yz83qex8g= c=1 sm=0 a=ctYbvhsBRPgA:10 a=vJ1w_8FsMGIA:10 a=Op-mwl0xAAAA:8 a=FCFy3MxVIMcLPkuj97cA:9 a=d4CUUju0HPYA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Sender: linux-mmc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-mmc@vger.kernel.org At http://dev.laptop.org/ticket/11980 we have determined that the Marvell CaFe SDHCI controller reports bad card presence during resume. It reports that no card is present even when it is. Around 400ms after resuming, a "card inserted" interrupt is generated, at which point it starts reporting presence. Work around this hardware oddity by setting the SDHCI_QUIRK_BROKEN_CARD_DETECTION flag. Thanks to Chris Ball for helping with diagnosis. Signed-off-by: Daniel Drake --- drivers/mmc/host/sdhci-pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/mmc/host/sdhci-pci.c b/drivers/mmc/host/sdhci-pci.c index 69ef0be..504da71 100644 --- a/drivers/mmc/host/sdhci-pci.c +++ b/drivers/mmc/host/sdhci-pci.c @@ -157,6 +157,7 @@ static const struct sdhci_pci_fixes sdhci_ene_714 = { static const struct sdhci_pci_fixes sdhci_cafe = { .quirks = SDHCI_QUIRK_NO_SIMULT_VDD_AND_POWER | SDHCI_QUIRK_NO_BUSY_IRQ | + SDHCI_QUIRK_BROKEN_CARD_DETECTION | SDHCI_QUIRK_BROKEN_TIMEOUT_VAL, };