lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 26 Nov 2015 17:24:40 +0100
From:	Ulf Hansson <ulf.hansson@...aro.org>
To:	Ulf Hansson <ulf.hansson@...aro.org>,
	linux-mmc <linux-mmc@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Nicolas Ferre <nicolas.ferre@...el.com>,
	"linux-arm-kernel@...ts.infradead.org" 
	<linux-arm-kernel@...ts.infradead.org>
Cc:	Ludovic Desroches <ludovic.desroches@...el.com>
Subject: Re: [PATCH v2] mmc: sdhci at91: add PM support

On 26 November 2015 at 17:07, Ludovic Desroches
<ludovic.desroches@...el.com> wrote:
> On Tue, Nov 10, 2015 at 12:12:30PM +0100, Ulf Hansson wrote:
>> On 10 November 2015 at 11:36, Ludovic Desroches
>> <ludovic.desroches@...el.com> wrote:
>> > Add runtime PM support and use runtime_force_suspend|resume() for system
>> > PM.
>> >
>
> [...]
>
>> >  static int sdhci_at91_probe(struct platform_device *pdev)
>> >  {
>> >         const struct of_device_id       *match;
>> > @@ -148,6 +206,11 @@ static int sdhci_at91_probe(struct platform_device *pdev)
>> >         if (ret)
>> >                 goto clocks_disable_unprepare;
>> >
>> > +       pm_runtime_set_active(&pdev->dev);
>> > +       pm_runtime_enable(&pdev->dev);
>> > +       pm_runtime_set_autosuspend_delay(&pdev->dev, 50);
>> > +       pm_runtime_use_autosuspend(&pdev->dev);
>>
>> Move these four runtime PM calls above sdhci_add_host(), as after that
>> point the host is used and thus runtime PM operations starts.
>
> Sadly I have discovered a bit late it is not working when doing this
> because the controller has been suspended before doing the
> sdhci_add_host().
>
> What is the right way to fix it? Calling pm_runtime_get_noresume()

I would do that before pm_runtime_enable().

> before sdhci_add_host() and calling pm_runtime_put_autosuspend() after?

Yes. Sorry for not spotting this before.

[...]

Kind regards
Uffe
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ