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]
Message-ID: <CAPDyKFoYU8MvWmBnLZ5j=vSBu6bFmOh7HHOJhZmo04p=feQA-g@mail.gmail.com>
Date:   Fri, 24 Aug 2018 08:30:41 +0200
From:   Ulf Hansson <ulf.hansson@...aro.org>
To:     Kai-Heng Feng <kai.heng.feng@...onical.com>
Cc:     Arnd Bergmann <arnd@...db.de>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Alan Stern <stern@...land.harvard.edu>,
        "Bauer.Chen" <bauer.chen@...ltek.com>, ricky_wu@...ltek.com,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        Linux USB List <linux-usb@...r.kernel.org>
Subject: Re: [PATCH 4/5] memstick: rtsx_usb_ms: Support runtime power management

On 23 August 2018 at 10:12, Kai-Heng Feng <kai.heng.feng@...onical.com> wrote:
> at 21:29, Ulf Hansson <ulf.hansson@...aro.org> wrote:
>
>> [...]
>>
>>> -#ifdef CONFIG_PM_SLEEP
>>> -static int rtsx_usb_ms_suspend(struct device *dev)
>>> +#ifdef CONFIG_PM
>>> +static int rtsx_usb_ms_runtime_suspend(struct device *dev)
>>>  {
>>>         struct rtsx_usb_ms *host = dev_get_drvdata(dev);
>>>         struct memstick_host *msh = host->msh;
>>>
>>> -       dev_dbg(ms_dev(host), "--> %s\n", __func__);
>>> -
>>> +       host->suspend = true;
>>>         memstick_suspend_host(msh);
>>
>>
>> I missed this one. Does this really work? To me, this looks like doing
>> things upside-down.
>>
>> To suspend the host, you first need to runtime resume it, because
>> mmc_suspend_host() calls into one of the host ops and my touch the
>> device, right?
>>
>> If you want to suspend the host (actually the naming is wrong, as it's
>> about suspending/power-iff the memstick card), that should be done via
>> when the memstick core finds that the card is removed or during system
>> wide suspend.
>
>
> Do you mean the logic was wrong even before my modification?

No. I think you should keep the existing callbacks for system sleep,
they seems to do what they should.

Then add new ones for runtime PM.

[...]

Kind regards
Uffe

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ