Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3310018pxf; Mon, 22 Mar 2021 03:27:30 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz7eeWGNFPLiRuBlfnYLrtP9h0jkfiswUGHisgWkspTeZLsd0zcsZRi/0z0E42ViNtRvZO8 X-Received: by 2002:a17:906:9509:: with SMTP id u9mr18503334ejx.225.1616408849969; Mon, 22 Mar 2021 03:27:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1616408849; cv=none; d=google.com; s=arc-20160816; b=E2gqLzP2T2xTxCwoRMLuQUyovqpOTieZFOE1iJrqze6o2W6K16bA2ZBT0L9XAaLleK F1Upj6KPhaFIhVXg/Rg7VP3cwAuy+Sj99vLyJkgkK6BrtM6V8ZrePPy+AICEvwk0/Ket ESUISkSKDDJ+i7Ped8D7Qybk96B/p9jmSN4I3zkqTNi0zQ0Ydg7KoqEU5SDAZ7zUBe0D BLolWLJvhPPHePh8A/Dak5Nlcp9slzS0PxlkyCBaQDaMiRiqw8QCHRVmFsWBdKIbSq+w h6NJtoTIjyKuY6QZ0Gzd3NeMja0W8vy9z+k6Oghsbrkdhw/d/PS00OZeBByn0oPYwUOo B0Yw== 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=nlgBwg2/OpoiuLdTjiONySB1mOVhMpjYXASTM5AYXtc=; b=0Wlv+O+OU0uEe3AQEK2eYj1hKobB6y5dC3prJpE1xmu12CRYAQRBdTHbfkXMfypsFI 52l6v05+q2s7xCXcde5aw/LVzhhZrmKnKPFSROBa4N084umiUzYuVrjQ4IbpHt4YzJog +sBLiEdwjN3SFlyLzP7zocJttjUAB86EB0aeimB4GKaWLYmcpciIjN7cNTYlf9kuWXKG ViOHWebDtx+u7hgBlIE3mirqyAN90UeNvlEytRO1NF6xyzeDFO4w2KMnqj+cf3nhj3UJ Y/mcPPiuiCpiQgmiYBuk9MxisVTYZrUIsnD+5wohXvTkBQINS4o+8EFWgztFKIDrSbBG S0Aw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vKw7B+Wu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id f14si10878520edd.140.2021.03.22.03.27.07; Mon, 22 Mar 2021 03:27:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vKw7B+Wu; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S230164AbhCVK0S (ORCPT + 99 others); Mon, 22 Mar 2021 06:26:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230136AbhCVK0A (ORCPT ); Mon, 22 Mar 2021 06:26:00 -0400 Received: from mail-vs1-xe31.google.com (mail-vs1-xe31.google.com [IPv6:2607:f8b0:4864:20::e31]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2155CC061574 for ; Mon, 22 Mar 2021 03:26:00 -0700 (PDT) Received: by mail-vs1-xe31.google.com with SMTP id e5so7164237vse.4 for ; Mon, 22 Mar 2021 03:26:00 -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=nlgBwg2/OpoiuLdTjiONySB1mOVhMpjYXASTM5AYXtc=; b=vKw7B+Wu8kUfIj79tr/6OWZCUMbwLLOqWrzzSbvl5AgKPINw+l3P2PAd12yQ95ycO9 PJCedxj3+roD8V0WlEcxBRwiqZqOPVWFj5jiYEmnkjEL2eQfN7x5JHGxPr3uK1ZhuvLz CL2vnURayg/QDXlUeS1+8qFazYLHbcEZxNMO0BAbORU0GYJOyE/MbNq2Fni3Hvoqkjjk J4zRn38kAlV3Na8cyxpNZ4lXVhPR9kbvTAN1/aPESqg6Dsqbq2lXxMRpq3RkCS7rDhNB MOSmCrmJel+Sfu1pNZwg2NUX5JY8Zvvzoh2Ztt0cgxtmDQURymgvcnhgg4Ch59cPf/Mb lveg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=nlgBwg2/OpoiuLdTjiONySB1mOVhMpjYXASTM5AYXtc=; b=bbZ1SwC+wE9Z9HM8yzN69E44ofqPRfhM04pYRQyIrgnDk0ydXPkV2vfKXFZg2c2sME JMgUO9nsBy+xwMVTGT0WFc/5s5OzzVUpIWEEB4N4JesUM3/Ll727BtcXfLHQGir2AdTu 6/kP5ix4mbf+tuIqJ4LixzA++gPE2qY/5FRF/RlSfrGnNy7oM1cLGYFMQT+tI6QVLxhF uxkA9JeKe+MSva3Y+KmXEy0mUXm2jFFFQslaunjCABCXqxALIo3E1KeFEgW69NVFlM/p vbEoHkAPqHkQ/Q17FypHtn/xShYPPTAKtco8vVvq/kv8WiiROlfuIsg8k+qurOtk8bRT /ElQ== X-Gm-Message-State: AOAM531/MsVuSCw4ymMyOfR4ifpg/QHlgkdyXjvzBaQovMNrA3EPH8+a iM5MbNitCU2zmV3HWTHGF4llN+u0SFUr2URjDRN9dA== X-Received: by 2002:a67:77c1:: with SMTP id s184mr8066406vsc.55.1616408759303; Mon, 22 Mar 2021 03:25:59 -0700 (PDT) MIME-Version: 1.0 References: <20210320045720.11872-1-chgokhl@gmail.com> In-Reply-To: <20210320045720.11872-1-chgokhl@gmail.com> From: Ulf Hansson Date: Mon, 22 Mar 2021 11:25:23 +0100 Message-ID: Subject: Re: [PATCH] mmc: core: Mark mmc_host device with pm_runtime_no_callbacks To: kehuanlin Cc: linux-mmc , Linux Kernel Mailing List , kehuanlin@fishsemi.com Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 20 Mar 2021 at 05:57, kehuanlin wrote: > > The rpm_resume() will call parent's resume callback recursively. > Since mmc_host has no its own pm_runtime callbacks, the mmc devices > may fail to resume (-ENOSYS in rpm_callback) sometimes. Mark mmc_host > device with pm_runtime_no_callbacks can fix the issue. Can you please elaborate more on this? What do you mean by "sometimes"? More precisely, how do you trigger the rpm_callback() for mmc class device to return -ENOSYS? Don't get me wrong, the patch is fine, but I want to understand if it actually solves a problem for you - or that it's better considered as an optimization? Kind regards Uffe > > Signed-off-by: kehuanlin > --- > drivers/mmc/core/host.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mmc/core/host.c b/drivers/mmc/core/host.c > index 9b89a91b6b47..177bebd9a6c4 100644 > --- a/drivers/mmc/core/host.c > +++ b/drivers/mmc/core/host.c > @@ -15,6 +15,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -480,6 +481,7 @@ struct mmc_host *mmc_alloc_host(int extra, struct device *dev) > host->class_dev.class = &mmc_host_class; > device_initialize(&host->class_dev); > device_enable_async_suspend(&host->class_dev); > + pm_runtime_no_callbacks(&host->class_dev); > > if (mmc_gpio_alloc(host)) { > put_device(&host->class_dev); > -- > 2.30.0 >