From: Ulf Hansson <ulf.hansson@linaro.org>
To: Kai-Heng Feng <kai.heng.feng@canonical.com>
Cc: arnd@arndb.de, gregkh@linuxfoundation.org,
linux-pm@vger.kernel.org, Ricky WU <ricky_wu@realtek.com>,
Thomas Hebb <tommyhebb@gmail.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v6 1/4] mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM
Date: Wed, 16 Feb 2022 11:22:52 +0100 [thread overview]
Message-ID: <CAPDyKFpx_H8b1KJ_yZ_3My_nxcC2e9k+wROH7hgfK3LbchQ8iQ@mail.gmail.com> (raw)
In-Reply-To: <CAAd53p5LxZh6-jZj274g6+PeDpAPWSiwRWXL93dgOg3xpqvu8g@mail.gmail.com>
On Wed, 16 Feb 2022 at 05:21, Kai-Heng Feng <kai.heng.feng@canonical.com> wrote:
>
> On Fri, Feb 4, 2022 at 8:28 PM Ulf Hansson <ulf.hansson@linaro.org> wrote:
> >
> > On Tue, 25 Jan 2022 at 06:50, Kai-Heng Feng <kai.heng.feng@canonical.com> 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 <ricky_wu@realtek.com>
> > > Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> >
> > 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
next prev parent reply other threads:[~2022-02-16 10:23 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-20 14:50 [PATCH 1/4] mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM Kai-Heng Feng
2022-01-20 14:50 ` [PATCH 2/4] misc: rtsx: Rework runtime power management flow Kai-Heng Feng
2022-01-21 1:40 ` [PATCH v2 " Kai-Heng Feng
2022-01-21 3:57 ` Ricky WU
2022-01-21 4:08 ` Kai-Heng Feng
2022-01-21 4:15 ` Ricky WU
2022-01-21 4:17 ` Kai-Heng Feng
2022-01-21 6:31 ` [PATCH v3 " Kai-Heng Feng
2022-01-21 9:58 ` Ricky WU
2022-01-21 12:39 ` Kai-Heng Feng
2022-01-24 3:26 ` Ricky WU
2022-01-24 4:53 ` Kai-Heng Feng
2022-01-24 5:10 ` Ricky WU
2022-01-24 5:26 ` Kai-Heng Feng
2022-01-24 5:47 ` [PATCH v4 1/4] mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM Kai-Heng Feng
2022-01-24 5:47 ` [PATCH v4 2/4] misc: rtsx: Rework runtime power management flow Kai-Heng Feng
2022-01-24 5:47 ` [PATCH v4 3/4] misc: rtsx: Cleanup power management ops Kai-Heng Feng
2022-01-24 5:47 ` [PATCH v4 4/4] misc: rtsx: Quiesce rts5249 on system suspend Kai-Heng Feng
2022-01-24 7:28 ` [PATCH v5 1/4] mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM Kai-Heng Feng
2022-01-24 7:28 ` [PATCH v5 2/4] misc: rtsx: Rework runtime power management flow Kai-Heng Feng
2022-01-24 7:28 ` [PATCH v5 3/4] misc: rtsx: Cleanup power management ops Kai-Heng Feng
2022-01-24 7:28 ` [PATCH v5 4/4] misc: rtsx: Quiesce rts5249 on system suspend Kai-Heng Feng
2022-01-25 5:50 ` [PATCH v6 1/4] mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM Kai-Heng Feng
2022-01-25 5:50 ` [PATCH v6 2/4] misc: rtsx: Rework runtime power management flow Kai-Heng Feng
2022-01-25 6:38 ` Ricky WU
2022-01-25 5:50 ` [PATCH v6 3/4] misc: rtsx: Cleanup power management ops Kai-Heng Feng
2022-01-25 6:38 ` Ricky WU
2022-01-25 5:50 ` [PATCH v6 4/4] misc: rtsx: Quiesce rts5249 on system suspend Kai-Heng Feng
2022-01-25 6:38 ` Ricky WU
2022-01-25 6:37 ` [PATCH v6 1/4] mmc: rtsx: Use pm_runtime_{get,put}() to handle runtime PM Ricky WU
2022-02-04 12:28 ` Ulf Hansson
2022-02-16 4:21 ` Kai-Heng Feng
2022-02-16 10:22 ` Ulf Hansson [this message]
2022-01-20 14:50 ` [PATCH 3/4] misc: rtsx: Cleanup power management ops Kai-Heng Feng
2022-01-20 14:50 ` [PATCH 4/4] misc: rtsx: Quiesce rts5249 on system suspend Kai-Heng Feng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAPDyKFpx_H8b1KJ_yZ_3My_nxcC2e9k+wROH7hgfK3LbchQ8iQ@mail.gmail.com \
--to=ulf.hansson@linaro.org \
--cc=arnd@arndb.de \
--cc=gregkh@linuxfoundation.org \
--cc=kai.heng.feng@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=ricky_wu@realtek.com \
--cc=tommyhebb@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).