Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp477535pxm; Wed, 2 Mar 2022 02:21:02 -0800 (PST) X-Google-Smtp-Source: ABdhPJxduYdxwC0VaE58SaB3wHQNiNdCgOjoXpF4EXEGiibVzV3giOuqrzPIlpjmVP6QplCM3NVk X-Received: by 2002:a17:902:ce05:b0:14f:8ba2:2339 with SMTP id k5-20020a170902ce0500b0014f8ba22339mr30421668plg.152.1646216462542; Wed, 02 Mar 2022 02:21:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646216462; cv=none; d=google.com; s=arc-20160816; b=bzOWuMhB55jkVteZU7TmK7rnUMIkKpuXevTGS88qou8QrcvcM67LN/gjliRR1odPG1 yPlNzsyfi017n+MG8L3Ssbp/Afii40GpOLIN3t2RvGGbimJT/ddfFCXW7/tRcAoqLmLl 26IB4JT3jLJbIR5GNfxWQjbPilgAWuLi9J29hnFFybm2l767lAumzxTQbZIgrI5poWfg uhGxl68EGAgI2sgwfELQAyCm84Fh9W8lsnDksHlHKf3WHYDEFyGdSMC+KXLuYVU5XO6L ANbd0YanbGJo4lcOfnlbX7g8tC1f+TK89SZPtO1tH2E2njR55e3lrx+o5bEYklFhGgxV T0Ig== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:to:content-language:subject:cc:user-agent:mime-version :date:message-id; bh=DeHspffgGTvwHoo0dACRtPnMlWTtlGIhdc8jKy4FSK0=; b=ve9pGa4ZaQ1zhNqi2kE0LlidQQzcgglaxnHc5UhzOKukIFMb891/LfHBXoSQrCu5DH 7aH2ojkuARhfU8FfNJVGyrTIt6ia/7bIP+Z+sN8SYLQDwW4TXqbyXMQweFnhhcrbXavM wncikomRB5MT1dE5stMeL87KYB0U6S2vcV9yP7h1yaFO5d6E2tkdNjxESmhfkeizxZoC iNuhPET8ZxTyRXmhHvyc8Ptz9foeTN/ZdQQEr5yPOUDzT8j1MCNsUD77FZqr+UyNKreI ciRll5wNoTF3E12p4cfGBKnPDY4ZYKJAsr7YiZC1DEXqYnzcFXBMzYv5RAV8Ng6Wt6FT yxrA== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=rock-chips.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c1-20020a6566c1000000b00378dd95c40fsi5039537pgw.333.2022.03.02.02.20.47; Wed, 02 Mar 2022 02:21:02 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=rock-chips.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238816AbiCBBPb (ORCPT + 99 others); Tue, 1 Mar 2022 20:15:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229771AbiCBBP2 (ORCPT ); Tue, 1 Mar 2022 20:15:28 -0500 X-Greylist: delayed 647 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Tue, 01 Mar 2022 17:14:45 PST Received: from mail-m121145.qiye.163.com (mail-m121145.qiye.163.com [115.236.121.145]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22685457B9; Tue, 1 Mar 2022 17:14:45 -0800 (PST) Received: from [172.16.12.69] (unknown [58.22.7.114]) by mail-m121145.qiye.163.com (Hmail) with ESMTPA id 56030800204; Wed, 2 Mar 2022 09:03:56 +0800 (CST) Message-ID: <242bae88-5dde-f005-6580-6024d51e0700@rock-chips.com> Date: Wed, 2 Mar 2022 09:03:56 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.6.0 Cc: shawn.lin@rock-chips.com, linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] mmc: host: dw-mmc-rockchip: avoid logspam when cd-broken Content-Language: en-GB To: Peter Geis , Jaehoon Chung , Ulf Hansson , Heiko Stuebner References: <20220228223642.1136229-1-pgwipeout@gmail.com> From: Shawn Lin In-Reply-To: <20220228223642.1136229-1-pgwipeout@gmail.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-HM-Spam-Status: e1kfGhgUHx5ZQUtXWQgPGg8OCBgUHx5ZQUlOS1dZCBgUCR5ZQVlLVUtZV1 kWDxoPAgseWUFZKDYvK1lXWShZQUlKS0tKN1dZLVlBSVdZDwkaFQgSH1lBWUNNSBlWS0pPSkNPSE gZGRgaVRMBExYaEhckFA4PWVdZFhoPEhUdFFlBWU9LSFVKSktITUpVS1kG X-HM-Sender-Digest: e1kMHhlZQR0aFwgeV1kSHx4VD1lBWUc6PQw6Iww6MT5RGkwDLxUuARlI DiNPC0tVSlVKTU9NSkNIS0hNQ0NNVTMWGhIXVQgTGgwVVRcSFTsJFBgQVhgTEgsIVRgUFkVZV1kS C1lBWU5DVUlJVUxVSkpPWVdZCAFZQUlCTkg3Bg++ X-HM-Tid: 0a7f4827b6c1b03akuuu56030800204 X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,NICE_REPLY_A, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL, RCVD_IN_SORBS_WEB,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no 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 Hi Peter, 在 2022/3/1 6:36, Peter Geis 写道: > The dw_mmc-rockchip driver drops a large amound of logspam constantly > when the cd-broken flag is enabled. > Set the warning to be debug ratelimited in this case. > May I know which platform did you use? > Signed-off-by: Peter Geis > --- > drivers/mmc/host/dw_mmc-rockchip.c | 9 +++++++-- > 1 file changed, 7 insertions(+), 2 deletions(-) > > diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c > index 95d0ec0f5f3a..d0ebf0afa42a 100644 > --- a/drivers/mmc/host/dw_mmc-rockchip.c > +++ b/drivers/mmc/host/dw_mmc-rockchip.c > @@ -50,8 +50,13 @@ static void dw_mci_rk3288_set_ios(struct dw_mci *host, struct mmc_ios *ios) > cclkin = ios->clock * RK3288_CLKGEN_DIV; > > ret = clk_set_rate(host->ciu_clk, cclkin); > - if (ret) > - dev_warn(host->dev, "failed to set rate %uHz\n", ios->clock); > + if (ret) { > + /* this screams when card detection is broken */ > + if (host->slot->mmc->caps & MMC_CAP_NEEDS_POLL) > + dev_dbg_ratelimited(host->dev, "failed to set rate %uHz\n", ios->clock); > + else > + dev_warn(host->dev, "failed to set rate %uHz\n", ios->clock); > + } > > bus_hz = clk_get_rate(host->ciu_clk) / RK3288_CLKGEN_DIV; > if (bus_hz != host->bus_hz) {