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: 50742 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-wi0-f197.google.com (mail-wi0-f197.google.com [209.85.212.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 0A2A5229FC for ; Mon, 6 Jul 2015 12:16:56 +0000 (UTC) Received: by wicne17 with SMTP id ne17sf2588178wic.0 for ; Mon, 06 Jul 2015 05:16:55 -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=jqhWlUS/d8QIbcxGTOyCCRjMadkYpwEdpLp2WUiIyoM=; b=d8VFFmaFNUW/iQz/jA+OimptJ7r5eLR2ArfKGwpkLeFW1WagANoaTeZy+rXq5v7IDm Ry1v7kjzipKBnSI8ZSkXJyKytKhc+aJ8ePA6P9sWiwBwgZuU60Duq96F27L6U5Jww0gC TnXbEra88pY96zT0wELmrzuR6PV2X8mk88KxEjz2MR21ICgxpYX+9icc/g90LnLFIvel bziqckdIhEqaeEDic9TPgiLb8S9qb15/Jf7DG1md1NBCTXEJStnff1mN1Ks0qd0j5bV9 d6AvT9I8cEt2NVuTMsaZyHQ7E+qc7qg73sf5lTeG1T627H9Ru4372HhOwP8AA1wPEfmy I4Ew== X-Gm-Message-State: ALoCoQkSyXti/A/vism+rPl+FSRt6JXi+kZLCgXlPRJbWb/1tyYBa58hWy1dJtnC2J/LXYSGhgwl X-Received: by 10.113.11.3 with SMTP id ee3mr30399088lbd.9.1436185015334; Mon, 06 Jul 2015 05:16:55 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.4.227 with SMTP id n3ls739097lan.0.gmail; Mon, 06 Jul 2015 05:16:55 -0700 (PDT) X-Received: by 10.112.56.139 with SMTP id a11mr48857772lbq.90.1436185014993; Mon, 06 Jul 2015 05:16:54 -0700 (PDT) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com. [209.85.215.54]) by mx.google.com with ESMTPS id oq3si15114858lbb.125.2015.07.06.05.16.54 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 06 Jul 2015 05:16:54 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.54 as permitted sender) client-ip=209.85.215.54; Received: by lazt12 with SMTP id t12so7201695laz.2 for ; Mon, 06 Jul 2015 05:16:54 -0700 (PDT) X-Received: by 10.152.5.197 with SMTP id u5mr9963195lau.76.1436185014823; Mon, 06 Jul 2015 05:16:54 -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 hn6csp1687040lbb; Mon, 6 Jul 2015 05:16:53 -0700 (PDT) X-Received: by 10.68.163.68 with SMTP id yg4mr104267385pbb.4.1436185010630; Mon, 06 Jul 2015 05:16:50 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id tn8si28688294pbc.207.2015.07.06.05.16.49; Mon, 06 Jul 2015 05:16:50 -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 S1755247AbbGFMQj (ORCPT + 29 others); Mon, 6 Jul 2015 08:16:39 -0400 Received: from mail-wg0-f53.google.com ([74.125.82.53]:35471 "EHLO mail-wg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754569AbbGFMQg (ORCPT ); Mon, 6 Jul 2015 08:16:36 -0400 Received: by wgjx7 with SMTP id x7so138422124wgj.2 for ; Mon, 06 Jul 2015 05:16:35 -0700 (PDT) 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-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.54 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 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; }