Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp1555662iof; Tue, 7 Jun 2022 07:42:31 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzvUk9Xuby/zBhZeMpSW1f/3w+ACRk5+WUVfJCIJ90X/Ziah6bvIwrFXC5ZaEq0WXpx0sdO X-Received: by 2002:a17:906:9749:b0:6f5:6cd:5bd9 with SMTP id o9-20020a170906974900b006f506cd5bd9mr28098618ejy.523.1654612951102; Tue, 07 Jun 2022 07:42:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654612951; cv=none; d=google.com; s=arc-20160816; b=xz+KTJsKuELvXN/aGQjMme7iMmJj5CsnQHNdoOzZMyN0RQ0YqA404QwKQ1DehYgXrW vmt4cWOG3tBefV/pYJVc4+NNvW6oi6JKnvwARMb5hiKKS1fTFhwO58vXiF/6VZUEok8M I0/7zT7YXSEUirrmhwlMluAWfWb5Cx48GFk0RcJDhGw37adnpnSXohBH3k/UJCIUJa3Z gDvGEWuJk1m/6NE0v703TGmUtrdFStt0nfxq1EfrRbCsqhtpO3eACjGhgqHbaVwB7DK3 UHu6++27/5FJxKxfFQZfZQbNHpqx27dD4WHu0eNdBpD6WZgm+sjDCtTRWgKRWd4oKLXN fzDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=jtPoJ12oteBNc0kHoMuvW+v6Ds9Jjp/7GrDvRJFQi1Y=; b=BboqXPDUhdev4j2vQmqHZRa2Ci1AWLKh7T4SRQtVv0CLsrC1O31YUecqDcvNiUaLCw xjpgVy9wIcWJnXZB9SQp2PHNiSMZ19mHxxQDzCBTOAhzWRly1REkFz5AuR+dP1SkJfc6 qhVUElKeyM1rIny5pEZT2mUBClSoQUlTZioPA6MqsUv2QqUQc3sc3OlLO1JphOcO625f 2dQ5SeFbHEPjUfEj97F/tefDXnPKkGnYoF8zNv20vHIKmBOq/oFiQ9LQCINC57EQAvG4 6KSd3LmgMNO+qWsEJyQMsLzQW4n32XsaDVv3oc4HvYuOfHfQSqkB7gL93KtXBSZ1+Drf C9nw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rUYTt0nR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hc33-20020a17090716a100b00711d5857d6fsi6052560ejc.844.2022.06.07.07.42.02; Tue, 07 Jun 2022 07:42:31 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rUYTt0nR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241309AbiFGKoI (ORCPT + 99 others); Tue, 7 Jun 2022 06:44:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37226 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241412AbiFGKoD (ORCPT ); Tue, 7 Jun 2022 06:44:03 -0400 Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB74B21275 for ; Tue, 7 Jun 2022 03:44:01 -0700 (PDT) Received: by mail-lf1-x12c.google.com with SMTP id be31so27662703lfb.10 for ; Tue, 07 Jun 2022 03:44:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jtPoJ12oteBNc0kHoMuvW+v6Ds9Jjp/7GrDvRJFQi1Y=; b=rUYTt0nRUcgy2g58Upir6dVsFF4oJe8a+uuLzUV1nk2gTpV0Fq6jaxzgHdC2qrMCxB OasoiAeKELkgi9Arq+AyCuBZWThXJYkiQcpLzz9d04wN1TmneEOCjOJrcLOo+Y0StMx+ hnxikTDEDlwgXlYU+D3193UAxMBJkocF+vwfs1Q3mX3BB0ayDXsdZN9nx5G1BHm4PSBD LGGBi5UKB5ITINpRyFRbDGZDDcLKiR6JuMAoiP+GXx1DS8J51u39KCQTVGvUpKbj4YFm pddaB97xGFjm75umbdWyHBU5DljCSc9boyzXph7fkA+MIgmpgIB64RF+TubqIAPVv0bg /Wsw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jtPoJ12oteBNc0kHoMuvW+v6Ds9Jjp/7GrDvRJFQi1Y=; b=qWZ8u4Z9TD1V+2xOWECrQQbbbWdZ7jlj1EuiN+qqVyMuMQxbTEXBJw4ILqUDmbO96V hoWv4VVYACQUxTH6to+cdd+T8gVUWInUBzZB8gqBwxaamH7F6sF1kKSJUsk8PLhDRRyZ UgikoEoqdeKnKMF87ITygAVpcUPilnt5uLnBDh8hd5eUdywcFpJ3DwR/D+a2Yl7mUVE5 5m/WX9XiLyYH2oxlR9VpGTi0lC1drvlhZX5pHM0bkK2R2S74oe0h62Yhi49oKqDPMuLX 4ejQk0Du0AsWixtEocKcQieA7GsWA5uBQ0MDnD+kURB/Ie6PC7KjIWEsI0Oyy7pyXHX9 O2Yg== X-Gm-Message-State: AOAM532ZqH6XmLaiiMJkdJO+fzUS4LyseN4co2VM9b2nl0ZzN8BcFQKV 9VHOm+9LKIejKZZs467G0Rh0MjX1uSZ5FdXKAlyahw== X-Received: by 2002:a05:6512:303:b0:479:1baf:7e5b with SMTP id t3-20020a056512030300b004791baf7e5bmr13446489lfp.184.1654598640330; Tue, 07 Jun 2022 03:44:00 -0700 (PDT) MIME-Version: 1.0 References: <20220602132543.596-1-chevron.li@bayhubtech.com> In-Reply-To: <20220602132543.596-1-chevron.li@bayhubtech.com> From: Ulf Hansson Date: Tue, 7 Jun 2022 12:43:23 +0200 Message-ID: Subject: Re: [PATCH V1 1/1] mmc:sdhci-pci-o2micro:fix card detect issue because card detect debouncing isn't done To: Chevron Li Cc: adrian.hunter@intel.com, linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org, shaper.liu@bayhubtech.com, xiaoguang.yu@bayhubtech.com, shirley.her@bayhubtech.com, fred.ai@bayhubtech.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2 Jun 2022 at 15:26, Chevron Li wrote: > > get_cd result is uncorrect during card detect debouncing > we need to wait card detect stable before return get_cd result > > Signed-off-by: Chevron Li Applied for fixes, by adding a fixes+stable tag, thanks! Kind regards Uffe > --- > change in V1: > add wait card detect stable logical before return card detect result. > --- > drivers/mmc/host/sdhci-pci-o2micro.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mmc/host/sdhci-pci-o2micro.c b/drivers/mmc/host/sdhci-pci-o2micro.c > index 92c20cb8074a..0d4d343dbb77 100644 > --- a/drivers/mmc/host/sdhci-pci-o2micro.c > +++ b/drivers/mmc/host/sdhci-pci-o2micro.c > @@ -152,6 +152,8 @@ static int sdhci_o2_get_cd(struct mmc_host *mmc) > > if (!(sdhci_readw(host, O2_PLL_DLL_WDT_CONTROL1) & O2_PLL_LOCK_STATUS)) > sdhci_o2_enable_internal_clock(host); > + else > + sdhci_o2_wait_card_detect_stable(host); > > return !!(sdhci_readl(host, SDHCI_PRESENT_STATE) & SDHCI_CARD_PRESENT); > } > > base-commit: d1dc87763f406d4e67caf16dbe438a5647692395 > -- > 2.32.0 >