From patchwork Mon Jul 6 12:16:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ivan T. Ivanov" X-Patchwork-Id: 6722671 X-Patchwork-Delegate: agross@codeaurora.org Return-Path: X-Original-To: patchwork-linux-arm-msm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id AE50BC05AD for ; Mon, 6 Jul 2015 12:16:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id E92772060A for ; Mon, 6 Jul 2015 12:16:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1266A2060F for ; Mon, 6 Jul 2015 12:16:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754569AbbGFMQk (ORCPT ); Mon, 6 Jul 2015 08:16:40 -0400 Received: from mail-wi0-f169.google.com ([209.85.212.169]:38436 "EHLO mail-wi0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755224AbbGFMQg (ORCPT ); Mon, 6 Jul 2015 08:16:36 -0400 Received: by wibdq8 with SMTP id dq8so151419879wib.1 for ; Mon, 06 Jul 2015 05:16:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=rNPf/bN6iOi7WTA1MBxalHxm/Ga6AAvnkrPathcEtc4=; b=LjTAtXPcqTgce0ji5lLfPSO5D+jWFrXPqkI/JENV62TwAIvyhEmkJDM/vaPgGTLvh6 zjLEO6zQwaE04MZ0XlC3+Gw2X+AdnJDiayqSD7ttTr6RTkjKoANfdzj5CDUiXC7xwzPt 6SX7v0IVvVi8kiFBzoKoVOyjjAFSAu9R+ZVUcMlUKCDjNXSsE7kfdS/UQCJC0jIzawXy RESBUBTjQg/oa+8h3xUX8ybisQMMMEmhgye5/hXmLONiM3jTL7ZxLNFw14eRe/S86tBv 1zUGU0tSI5l63+By2GF4HIOS+Mg5Yer7hqsJpQUtZhtJjVisWotoIviDCyEna8TSo/Pd h9pg== X-Gm-Message-State: ALoCoQnzpAtxcfNhYESz/DU1X/5LdSY7q/UI/5pmNoBabPJWlNH2wSLO1dslLdMb7vEFbslfjOsV X-Received: by 10.194.120.230 with SMTP id lf6mr50962392wjb.41.1436184994992; Mon, 06 Jul 2015 05:16:34 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by mx.google.com with ESMTPSA id ha4sm46918316wib.0.2015.07.06.05.16.33 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 06 Jul 2015 05:16:34 -0700 (PDT) From: "Ivan T. Ivanov" To: Ulf Hansson Cc: Adrian Hunter , Tim Kryger , Aisheng Dong , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org Subject: [PATCH v2 3/3] mmc: sdhci: properly check card present state when quirk NO_CARD_NO_RESET is set Date: Mon, 6 Jul 2015 15:16:21 +0300 Message-Id: <1436184981-16719-4-git-send-email-ivan.ivanov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1436184981-16719-1-git-send-email-ivan.ivanov@linaro.org> References: <1436184981-16719-1-git-send-email-ivan.ivanov@linaro.org> Sender: linux-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Controller could have both NO_CARD_NO_RESET and BROKEN_CARD_DETECTION quirks set. Use sdhci_do_get_cd() when applying NO_CARD_NO_RESET, which properly check for BROKEN_CARD_DETECTION quirk. Signed-off-by: Ivan T. Ivanov --- drivers/mmc/host/sdhci.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 02ac7a4..e22e47c 100644 --- a/drivers/mmc/host/sdhci.c +++ b/drivers/mmc/host/sdhci.c @@ -207,8 +207,7 @@ EXPORT_SYMBOL_GPL(sdhci_reset); static void sdhci_do_reset(struct sdhci_host *host, u8 mask) { if (host->quirks & SDHCI_QUIRK_NO_CARD_NO_RESET) { - if (!(sdhci_readl(host, SDHCI_PRESENT_STATE) & - SDHCI_CARD_PRESENT)) + if (!sdhci_do_get_cd(host)) return; }