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 Apr 2018 08:58:32 +0200
From:   "Rafael J. Wysocki" <rjw@...ysocki.net>
To:     Kai Heng Feng <kai.heng.feng@...onical.com>
Cc:     bhelgaas@...gle.com, linux-pci@...r.kernel.org,
        Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        stable@...r.kernel.org
Subject: Re: [PATCH v3] PCI / PM: Always check PME wakeup capability for runtime wakeup support

On Thursday, April 26, 2018 8:54:14 AM CEST Kai Heng Feng wrote:
> 
> > On Apr 13, 2018, at 3:29 PM, Rafael J. Wysocki <rjw@...ysocki.net> wrote:
> >
> > On Friday, April 13, 2018 8:58:11 AM CEST Kai Heng Feng wrote:
> >> Hi Bjorn and Rafael,
> >>
> >>> On Apr 1, 2018, at 12:40 AM, Kai-Heng Feng <kai.heng.feng@...onical.com>
> >>> wrote:
> >>>
> >>> USB controller ASM1042 stops working after commit de3ef1eb1cd0 ("PM /
> >>> core: Drop run_wake flag from struct dev_pm_info").
> >>>
> >>> The device in question is not power managed by platform firmware,
> >>> furthermore, it only supports PME# from D3cold:
> >>> Capabilities: [78] Power Management version 3
> >>>        Flags: PMEClk- DSI- D1- D2- AuxCurrent=55mA PME(D0-,D1-,D2-,D3hot-,D3cold+)
> >>>        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
> >>>
> >>> Before commit de3ef1eb1cd0, the device never gets runtime suspended.
> >>> After that commit, the device gets runtime suspended, so it does not
> >>> respond to any PME#.
> >>>
> >>> usb_hcd_pci_probe() mandatorily calls device_wakeup_enable(), hence
> >>> device_can_wakeup() in pci_dev_run_wake() always returns true.
> >>>
> >>> So pci_dev_run_wake() needs to check PME wakeup capability as its first
> >>> condition.
> >>>
> >>> In addition, change wakeup flag passed to pci_target_state() from false
> >>> to true, because we want to find the deepest state that the device can
> >>> still generate PME#.
> >>>
> >>> Fixes: de3ef1eb1cd0 ("PM / core: Drop run_wake flag from struct
> >>> dev_pm_info")
> >>> Cc: stable@...r.kernel.org # 4.13+
> >>> Signed-off-by: Kai-Heng Feng <kai.heng.feng@...onical.com>
> >>> ---
> >>> v3: State the reason why the wakeup flag gets changed.
> >>>
> >>> v2: Explicitly check dev->pme_support.
> >>
> >> If this patch is good enough, I am hoping it can get merged in v4.17.
> >
> > OK
> >
> > Bjorn, if you want to take this:
> >
> >  Reviewed-by: Rafael J. Wysocki <rafael.j.wysocki@...el.com>
> >
> > Otherwise please let me know and I'll queue it up.
> 
> Hi, Rafael,
> Can this patch be merged into your tree?

If Bjorn tells me to do that, then yes, it can.

Thanks,
Rafael

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ