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: <1541750924.32173.81.camel@mhfsdcap03>
Date:   Fri, 9 Nov 2018 16:08:44 +0800
From:   Chunfeng Yun <chunfeng.yun@...iatek.com>
To:     Alan Cooper <alcooperx@...il.com>
CC:     ": Linux Kernel Mailing List" <linux-kernel@...r.kernel.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Alban Bedel <albeu@...e.fr>, Alex Elder <elder@...aro.org>,
        Andrew Morton <akpm@...ux-foundation.org>,
        "Arnd Bergmann" <arnd@...db.de>,
        Avi Fishman <avifishman70@...il.com>,
        <bcm-kernel-feedback-list@...adcom.com>,
        Bjorn Andersson <bjorn.andersson@...aro.org>,
        "David S. Miller" <davem@...emloft.net>,
        DTML <devicetree@...r.kernel.org>,
        Dmitry Osipenko <digetx@...il.com>,
        "Greg Kroah-Hartman" <gregkh@...uxfoundation.org>,
        "Gustavo A. R. Silva" <gustavo@...eddedor.com>,
        Hans de Goede <hdegoede@...hat.com>,
        James Hogan <jhogan@...nel.org>,
        Jianguo Sun <sunjianguo1@...wei.com>,
        Johan Hovold <johan@...nel.org>,
        Kees Cook <keescook@...omium.org>,
        USB list <linux-usb@...r.kernel.org>,
        Lu Baolu <baolu.lu@...ux.intel.com>,
        "Mark Rutland" <mark.rutland@....com>,
        Martin Blumenstingl <martin.blumenstingl@...glemail.com>,
        Mathias Nyman <mathias.nyman@...el.com>,
        Mathias Nyman <mathias.nyman@...ux.intel.com>,
        Mauro Carvalho Chehab <mchehab+samsung@...nel.org>,
        Rishabh Bhatnagar <rishabhb@...eaurora.org>,
        Rob Herring <robh+dt@...nel.org>, Roger Quadros <rogerq@...com>
Subject: Re: [PATCH V2 2/6] usb: core: Add ability to skip phy exit on
 suspend and init on resume

On Thu, 2018-11-08 at 17:50 -0500, Alan Cooper wrote:
> On Wed, Nov 7, 2018 at 8:43 PM Chunfeng Yun <chunfeng.yun@...iatek.com> wrote:
> >
> > hi,
> > On Tue, 2018-10-30 at 18:30 -0400, Alan Cooper wrote:
> > > On 10/17/18 9:46 PM, Chunfeng Yun wrote:> hi,
> > > >
> > > > On Wed, 2018-10-17 at 18:29 -0400, Al Cooper wrote:
> > > >> Add the ability to skip calling the PHY's exit routine on suspend
> > > >> and the PHY's init routine on resume. This is to handle a USB PHY
> > > >> that should have it's power_off function called on suspend but
> > > cannot
> > > >> have it's exit function called because on exit it will disable the
> > > >> PHY to the point where register accesses to the Host Controllers
> > > >> using the PHY will be disabled and the host drivers will crash.
> > > >>
> > > >> This is enabled with the HCD flag "suspend_without_phy_exit" which
> > > >> can be set from any HCD driver.
> > > >>
> > > >> Signed-off-by: Al Cooper<alcooperx@...il.com>
> > > >> ---
> > > >>   drivers/usb/core/hcd.c  |  8 ++++----
> > > >>   drivers/usb/core/phy.c  | 18 ++++++++++++------
> > > >>   drivers/usb/core/phy.h  |  9 ++++++---
> > > >>   include/linux/usb/hcd.h |  3 +++
> > > >>   4 files changed, 25 insertions(+), 13 deletions(-)
> > > >>
> >
> >
> > > >>       unsigned        skip_phy_initialization:1;
> > > >>
> > > >> +    /* Some phys don't want the phy's exit/init called on
> > > suspend/resume */
> > > >> +    unsigned        suspend_without_phy_exit:1;
> > > > As suggested before, you can skip phy's exit/init during
> > > suspend/resume
> > > > by enabling wakeup of hcd, so needn't add a new variable for it.
> > >
> > > I still need to be able to enable and disable wakeup for this driver.
> > Just use device_init_wakeup(dev, true) instead of
> > device_wakeup_enable(dev) for your controller driver, you can try it.
> >
> > Sorry for the late replay
> 
> What about the case where sysfs is used to disable wakeup?
Oh, It's a problem in this case.

BTW: Why the host driver will crash when access host controller's
register after power-off phy? they are usually independent.

> 
> Al
> > >
> > > >
> > > >> +
> > > >>       /* The next flag is a stopgap, to be removed when all the
> > > HCDs
> > > >>        * support the new root-hub polling mechanism. */
> > > >>       unsigned        uses_new_polling:1;
> > > >
> >
> >


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ