From: Chris Ball <cjb@laptop.org>
To: Pierre Tardy <tardyp@gmail.com>
Cc: "Rafael J. Wysocki" <rjw@sisk.pl>,
Pierre Tardy <pierre.tardy@intel.com>,
linux-pm@lists.linux-foundation.org, linux-mmc@vger.kernel.org,
linux-kernel@vger.kernel.org, Yunpeng Gao <yunpeng.gao@intel.com>
Subject: Re: [PATCH v2 2/3] sdhci-pci : Enable runtime PM support
Date: Mon, 21 Feb 2011 20:45:23 +0000 [thread overview]
Message-ID: <20110221204523.GA28419@void.printf.net> (raw)
In-Reply-To: <AANLkTi=iZ3dzAoRuRdpvQ=uBp4u8O8LtMuu2XdSWeZwr@mail.gmail.com>
Hi Pierre,
On Sun, Feb 13, 2011 at 11:42:01AM +0100, Pierre Tardy wrote:
> > [ 10.892280] sdhci-pci 0000:17:00.0: Unbalanced pm_runtime_enable!
>
> I never have seen this before. I'm not testing those patches on
> mmc-next, as our platform is not totally upstream yet, and do not boot
> on 2.6.37+ based kernel.
> However, we backported the pm_runtime patches from 2.6.37. Is there
> some differences in very latest patches on default enablement of
> runtime_pm?
It's getting enabled by drivers/pci/pci-driver.c:local_pci_probe(),
before the sdhci-pci probe function runs. local_pci_probe() does:
/* Unbound PCI devices are always set to disabled and suspended.
* During probe, the device is set to enabled and active and the
* usage count is incremented. If the driver supports runtime PM,
* it should call pm_runtime_put_noidle() in its probe routine and
* pm_runtime_get_noresume() in its remove routine.
*/
pm_runtime_get_noresume(dev);
pm_runtime_set_active(dev);
pm_runtime_enable(dev);
and then the "Unbalanced pm_runtime_enable!" message appears when
sdhci_pci_probe() calls pm_runtime_enable() for the second time.
> > I then removed the card and reinserted it, but there's no dmesg output
> > related to the reinsert, only to the card removal:
> >
> > [ 65.381047] mmc0: card d555 removed
> >
> > So, card insertion is broken. I then did rmmod sdhci-pci && modprobe
> > sdhci-pci, and it picked up the card again.
>
> So what you have here is non working card-detection when device is in PCI_D3.
> This sounds like a HW limitation in you platform.
>
> D3 is originally meant for suspend to ram, so it sounds logic that
> some HW wont support wake on card detect.
> it sounds like we need a SDHCI_RUNTIME_PM_CAP, so that we can properly
> describe which HW can be safely put D3 at runtime.
> Also, maybe on some HW, D1 will support wake on card detect. I dont
> know how can the driver hint pci subsystem that it should go D1 rather
> than D3 in the runtime_pm flow.
> Maybe Rafael can advice on this.
The controller advertises the ability to generate PME wakeups from D3
in its PCI capabilities; perhaps we just aren't programming it properly.
I don't see anything in your patch that would set SDHCI wakeup bits or
unmask card insertion/removal IRQs -- maybe that could be it?
Thanks,
--
Chris Ball <cjb@laptop.org> <http://printf.net/>
One Laptop Per Child
next prev parent reply other threads:[~2011-02-21 20:45 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-06 18:02 [PATCH v2 0/3] sdhci runtime_pm implementation using mmc clock gating fw Pierre Tardy
2011-02-06 18:02 ` [PATCH v2 1/3] mmc: put the led blinking code after clock ungating Pierre Tardy
2011-02-06 18:02 ` [PATCH v2 2/3] sdhci-pci : Enable runtime PM support Pierre Tardy
2011-02-06 21:15 ` Chris Ball
2011-02-10 4:37 ` Chris Ball
2011-02-13 10:42 ` Pierre Tardy
2011-02-21 20:45 ` Chris Ball [this message]
2011-02-25 7:33 ` Tardy, Pierre
2011-02-25 14:54 ` Matthew Garrett
2011-02-25 18:28 ` R. J. Wysocki
2011-02-06 18:02 ` [PATCH v2 3/3] sdhci:v2:use ios->clock to know when sdhci is idle Pierre Tardy
2011-02-06 18:54 ` [PATCH v2 0/3] sdhci runtime_pm implementation using mmc clock gating fw Linus Walleij
2011-02-06 20:35 ` Chris Ball
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=20110221204523.GA28419@void.printf.net \
--to=cjb@laptop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=pierre.tardy@intel.com \
--cc=rjw@sisk.pl \
--cc=tardyp@gmail.com \
--cc=yunpeng.gao@intel.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