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: 6679891 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 802AEC05AD for ; Fri, 26 Jun 2015 10:01:23 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9FD8C2069D for ; Fri, 26 Jun 2015 10:01:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id C031F206B7 for ; Fri, 26 Jun 2015 10:01:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752737AbbFZKBV (ORCPT ); Fri, 26 Jun 2015 06:01:21 -0400 Received: from mail-wi0-f173.google.com ([209.85.212.173]:34093 "EHLO mail-wi0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752199AbbFZKAS (ORCPT ); Fri, 26 Jun 2015 06:00:18 -0400 Received: by wicnd19 with SMTP id nd19so40681836wic.1 for ; Fri, 26 Jun 2015 03:00:17 -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=BtgjVQjKosED27Vi64ovQniprXMOQXv8WMRiHB6nATA=; b=mg87eIQ21D/o0M+Po6FsV0Aqi+yQD3SzFZO7mVsSiglz6ebPIFjW/Tc7z2Yaz9CAGG 3fP59Hzb+Wij/eZLycA28GDy6ZZ6ZomLSA9/X8tT3vxpZDL0SePSmwGH/w+0iydRRI5h GWSXJU154sQyJuur2GVkxyFC4/fQqZdupBRa4P9BOXpO6OicodfvX24Y4QBADdHP7Urd PZf0vTyd/tOQHmL/RoXQHOUBrsVdcJaRs94uEaEEeFX7XKiGQ2YKIz/Q0QvoaFKNwM+0 4whdUnh794qef3sz/HEYClOpmQZF0sY84JEeeS44T7e4atMm5yj1zbGjYwEeySCzjQFa fa7g== X-Gm-Message-State: ALoCoQng2TrHHc/wC/Rt5eUfFZbB4txxhvOK2LP4iwJ+eKecWeVXv6t77ghsOdJf/Tc1GME8bBLS 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-arm-msm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham 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 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; }