Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp701506pxb; Wed, 16 Feb 2022 02:25:41 -0800 (PST) X-Google-Smtp-Source: ABdhPJxHwcR0VXP1X/N8FocGKMnvdkN+Nz8jyYLzHyKPIxpsaw5AGqTSrdBm/fagewLkmHRtb/fi X-Received: by 2002:a17:902:8a8a:b0:14d:bd69:e797 with SMTP id p10-20020a1709028a8a00b0014dbd69e797mr1815421plo.49.1645007131179; Wed, 16 Feb 2022 02:25:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645007131; cv=none; d=google.com; s=arc-20160816; b=swc0naJ1tfpje+PgGbXmkIIama6GKHL0Kv4dYkvO3VZ413wSZHS0w7WldrMpZt0wUF PuBw53rVhPyCaIAgDGGBJE4mOEysBYU9Wl3ESnLN3+DiOX+DSn3d9yZ8wrEqs+z9L+tA Q26Wu07niJQzmkUX83NbaxMLVmNdSafyU0ig1t3kfhWqipX/aXOYkQERIWHnayckkqSJ vwYPBuJxBT+JfD6+bY8LJQ21Uct95VJrTjhel2RTHLhjJ3tsu/C5zrnO8qJMi/Rnvyip D1QsWWHDmMswk2mL/1AAvRBrLf7nCy5UqvRwG1r9Qnh00gX+VMTIpmIg10koYEZlh1jU Y+1g== 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=BgTdt/5Tmin+RrpPEv4f+OmO2PXeyvBfP6PGIN1pw00=; b=uNHKkbc1U1GSYIcw0B88eveBxX7ZdyGMXcChla6c+kW6PvSWpzTSVLFc/6pATyOj3/ al/nlVFyGXUlTXsE76T9XYrmHNvYDYC50P3LD5p+pkVeBHY45B/QjsEMnwsnP1FoE5HJ MEuJoJALiiiGEc1sNMd0/OLdqFvHGq6bcqUbFhmIgFm7MCwEZNvlO8XzElFj9HTTC3HI aw6qeWN/+kxv9fwCTj4x9lemYeAXUvJCl5cMlM6JFH2JwnzS+UF53AG+DJw9uIrX9dOm lNqnPVLLM+ENBfZWGwC3ozQmuAccU5/Uxlo8cT20JWU38ZM5qYuJpEhBBucNvGhopnWP H86g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZgyZzKrm; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id bh14si5968899pgb.425.2022.02.16.02.25.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Feb 2022 02:25:31 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ZgyZzKrm; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 391D62069BC; Wed, 16 Feb 2022 02:23:42 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229636AbiBPKXp (ORCPT + 99 others); Wed, 16 Feb 2022 05:23:45 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:35206 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229706AbiBPKXn (ORCPT ); Wed, 16 Feb 2022 05:23:43 -0500 Received: from mail-lf1-x12d.google.com (mail-lf1-x12d.google.com [IPv6:2a00:1450:4864:20::12d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 79216206997 for ; Wed, 16 Feb 2022 02:23:30 -0800 (PST) Received: by mail-lf1-x12d.google.com with SMTP id b11so2884409lfb.12 for ; Wed, 16 Feb 2022 02:23:30 -0800 (PST) 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=BgTdt/5Tmin+RrpPEv4f+OmO2PXeyvBfP6PGIN1pw00=; b=ZgyZzKrmMhsvCg4VMfuF0GDqGdzdbOAx4uk46L+7NyKSrkuFJ6DR2tWzprIB09t90F pdEfMTaqxgUhrDo328Woxo49aijQt/PH+5GrkfdtSWRvyq4re5bzLedlwmNSTfT3+kn8 Fh2guaKG2mWyijqIWhMdIhxXS1MGbaVDkGR1LWbDV24YlHrSA0CsW/PNLugG+ufy821z QnY+PS1GQuurqd7ygmJgwJZvUwPTLfp5gfntzw00S2My1DCDpGjeRNJeADYNm/a4KfcS zikp3p85IJaJaTZz6K1bUbQMmH7pNCsZYSCy6VpzOAirR9tSzCC+0jVLrKm95rP1yGl4 VhOA== 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=BgTdt/5Tmin+RrpPEv4f+OmO2PXeyvBfP6PGIN1pw00=; b=wLK1bdPXpx5OOo4B7YoiXtOPf92mvRUKJQqdP4xbFy57EBm3aUMnLs+LGDPzHGHd7q hLUsswLo42Kgb2+VGtFsst4+4em6jQ8zxe46XJXQ0ND2497/uZLCEMKDrIE/TZOPIF4Q UCPNiZACgk9FD1K7p4zjZAo7tN6xBglWbHaO7839JXB9qLaMqJhmufxgm+tPVENUaRsx njj6xJDxaqAvYQEzQUu5X+1cjUi/0O8P0K4RDaZmgDu4cOZXaZ18ZqrpP6zdHJvW8cwr U73dV0Pn3+biTpSlNz2cdGBcl2GAAmCDA6sV/89Y1DAMgIHMzOzl52PXYW1K13LoRxA5 dI1Q== X-Gm-Message-State: AOAM533Yvq4GvwQWDXallLj9Xyh7m0cabtRLAPS8dxLZspwyITSQM8te gfspIc80yMJH5OdJIZzyN9UM67s74wBobrIKd2Xqxw== X-Received: by 2002:a05:6512:388d:b0:443:6066:2c8d with SMTP id n13-20020a056512388d00b0044360662c8dmr1521088lft.184.1645007008626; Wed, 16 Feb 2022 02:23:28 -0800 (PST) MIME-Version: 1.0 References: <20220121014039.1693208-1-kai.heng.feng@canonical.com> <20220125055010.1866563-1-kai.heng.feng@canonical.com> In-Reply-To: From: Ulf Hansson Date: Wed, 16 Feb 2022 11:22:52 +0100 Message-ID: Subject: Re: [PATCH v6 1/4] mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM To: Kai-Heng Feng Cc: arnd@arndb.de, gregkh@linuxfoundation.org, linux-pm@vger.kernel.org, Ricky WU , Thomas Hebb , linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,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 On Wed, 16 Feb 2022 at 05:21, Kai-Heng Feng wrote: > > On Fri, Feb 4, 2022 at 8:28 PM Ulf Hansson wrote: > > > > On Tue, 25 Jan 2022 at 06:50, Kai-Heng Feng wrote: > > > > > > Commit 5b4258f6721f ("misc: rtsx: rts5249 support runtime PM") doesn't > > > use pm_runtime_{get,put}() helpers when it should, so the RPM refcount > > > keeps at zero, hence its parent driver, rtsx_pci, has to do lots of > > > weird tricks to keep it from runtime suspending. > > > > > > So use those helpers at right places to properly manage runtime PM. > > > > > > Fixes: 5b4258f6721f ("misc: rtsx: rts5249 support runtime PM") > > > Cc: Ricky WU > > > Signed-off-by: Kai-Heng Feng > > > > The runtime PM reference counting for the mmc host device is managed > > by the mmc core. Have a look at __mmc_claim_host() and > > mmc_release_host(). > > > > In other words, the runtime PM reference counting should not be needed > > in the mmc host driver, unless there are some specific cases, like for > > example during ->probe|remove(). > > > > So perhaps it's only the changes in the ->probe|remove() functions > > that you need to fix the problems? No? > > Yes you are right. Let me send a patch to remove redundant PM helpers > from this patch. Ohh, I didn't know that Greg already queued this up. Seems like I don't get more than one week to review. :-) Alright, I will look at your new patch then. Kind regards Uffe