From patchwork Fri Jun 26 10:00:10 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: 50338 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wg0-f69.google.com (mail-wg0-f69.google.com [74.125.82.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 6000C22902 for ; Fri, 26 Jun 2015 10:00:45 +0000 (UTC) Received: by wgfj7 with SMTP id j7sf25764150wgf.1 for ; Fri, 26 Jun 2015 03:00:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=X8UobDb2VfNmqivyiItwTDehbeFK29AnrcRjfLTxDEA=; b=EfoWoR+FjQ8lS/R3vMO9rPT1yqtdQGGzyFsUK7M/q72GzG+QEkLfDgdtovmJrzsFtt 37qjJqmf5m309a6uHA5QvXGbS0kIEnm8p+p5aGCC3a5jLyvBAzpTj/e1r5cUm7yvtwT8 73XvF94ADHp2R6YruE1yK7BaCACwo/W/ly4QX+hmvm/4HMTJdMSBJlhz+EdXm5Blwtyz hFqMSzQaOy9ChGE5+99ceHj7013d39fTlterRwtxcSxOuNiRpLVXdP0HH6rCfY1zkIWY lgjeDntgfdAwgpQ8qJDlK0+YWpcWahJ5AvwcECVqDcuD5X3sJe0YwNIdWZ8muIdBefk0 rOWA== X-Gm-Message-State: ALoCoQmhPkRXxBSFou1PKCOBnijIxiCsBg7zDd1PdtfbOojAczLdw674H1nFDZo3Bgt+Nl1RzyVC X-Received: by 10.152.6.103 with SMTP id z7mr596413laz.8.1435312844662; Fri, 26 Jun 2015 03:00:44 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.8.1 with SMTP id n1ls411574laa.87.gmail; Fri, 26 Jun 2015 03:00:44 -0700 (PDT) X-Received: by 10.112.41.171 with SMTP id g11mr779471lbl.123.1435312844453; Fri, 26 Jun 2015 03:00:44 -0700 (PDT) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id t9si20152043lat.175.2015.06.26.03.00.44 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 26 Jun 2015 03:00:44 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by lagx9 with SMTP id x9so60570599lag.1 for ; Fri, 26 Jun 2015 03:00:44 -0700 (PDT) X-Received: by 10.112.126.101 with SMTP id mx5mr817223lbb.35.1435312844207; Fri, 26 Jun 2015 03:00:44 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.108.230 with SMTP id hn6csp1193891lbb; Fri, 26 Jun 2015 03:00:42 -0700 (PDT) X-Received: by 10.66.119.174 with SMTP id kv14mr1714027pab.5.1435312841617; Fri, 26 Jun 2015 03:00:41 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id pz9si15979477pdb.3.2015.06.26.03.00.40; Fri, 26 Jun 2015 03:00:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752818AbbFZKAd (ORCPT + 30 others); Fri, 26 Jun 2015 06:00:33 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:34946 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751914AbbFZKAS (ORCPT ); Fri, 26 Jun 2015 06:00:18 -0400 Received: by wiga1 with SMTP id a1so12954817wig.0 for ; Fri, 26 Jun 2015 03:00:17 -0700 (PDT) X-Received: by 10.194.6.37 with SMTP id x5mr1561155wjx.73.1435312817165; Fri, 26 Jun 2015 03:00:17 -0700 (PDT) Received: from localhost.localdomain ([37.157.136.206]) by mx.google.com with ESMTPSA id ha4sm1506507wib.0.2015.06.26.03.00.16 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Jun 2015 03:00:16 -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 3/3] mmc: sdhci: properly check card present state when quirk NO_CARD_NO_RESET is set Date: Fri, 26 Jun 2015 13:00:10 +0300 Message-Id: <1435312810-23957-4-git-send-email-ivan.ivanov@linaro.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1435312810-23957-1-git-send-email-ivan.ivanov@linaro.org> References: <1435312810-23957-1-git-send-email-ivan.ivanov@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ivan.ivanov@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , 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-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ diff --git a/drivers/mmc/host/sdhci.c b/drivers/mmc/host/sdhci.c index 0b65752..912a3bb 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; }