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: <20191227014459.GA5283@b29397-desktop>
Date:   Fri, 27 Dec 2019 01:45:03 +0000
From:   Peter Chen <peter.chen@....com>
To:     Alan Stern <stern@...land.harvard.edu>
CC:     Guenter Roeck <linux@...ck-us.net>,
        Peter Chen <peter.chen@...escale.com>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        "linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        Michael Grzeschik <m.grzeschik@...gutronix.de>,
        "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: Re: [PATCH] usb: chipidea: host: Disable port power only if
 previously enabled

On 19-12-26 14:46:15, Alan Stern wrote:
> On Thu, 26 Dec 2019, Guenter Roeck wrote:
> 
> > On shutdown, ehci_power_off() is called unconditionally to power off
> > each port, even if it was never called to power on the port.
> > For chipidea, this results in a call to ehci_ci_portpower() with a request
> > to power off ports even if the port was never powered on.
> > This results in the following warning from the regulator code.
> 
> That's weird -- we should always power-on every port during hub 
> initialization.
> 
> It looks like there's a bug in hub.c:hub_activate(): The line under
> HUB_INIT which calls hub_power_on() should call
> usb_hub_set_port_power() instead.  In fact, the comment near the start
> of hub_power_on() is wrong.  It says "Enable power on each port", but
> in fact it only enables power for ports that had been powered-on
> previously (i.e., the port's bit in hub->power_bits was set).  
> Apparently this got messed up in commit ad493e5e5805 ("usb: add usb
> port auto power off mechanism").
> 
> Now, the chipidea driver may still need to be updated, because 
> ehci_turn_off_all_ports() will still be called during shutdown and it 
> will try to power-down all ports, even those which are already powered 
> down (for example, because the port is suspended).
> 

Hi Alan,

When the port is suspended, why it was turned off? If it was turned
off, how could respond wakeup event?

-- 

Thanks,
Peter Chen

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ