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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAODwPW9HUaHuDjCEo9E=EUtnWPaK28q06L4kFYFyXUusNZngFw@mail.gmail.com>
Date:	Mon, 10 Nov 2014 10:26:17 -0800
From:	Julius Werner <jwerner@...omium.org>
To:	Kever Yang <kever.yang@...k-chips.com>
Cc:	Julius Werner <jwerner@...omium.org>,
	Tao Huang <huangtao@...k-chips.com>,
	戴克霖 <dkl@...k-chips.com>,
	addy ke <addy.ke@...k-chips.com>,
	han jiang <hj@...k-chips.com>,
	Heiko Stuebner <heiko@...ech.de>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	"linux-usb@...r.kernel.org" <linux-usb@...r.kernel.org>,
	Douglas Anderson <dianders@...omium.org>,
	Felipe Balbi <balbi@...com>,
	LKML <linux-kernel@...r.kernel.org>,
	linux-rockchip@...ts.infradead.org,
	Jianqun Xu <xjq@...k-chips.com>, Eddie Cai <cf@...k-chips.com>,
	Dinh Nguyen <dinguyen@...nsource.altera.com>,
	romain.perier@...il.com, Sonny Rao <sonnyrao@...omium.org>,
	Paul Zimmerman <paulz@...opsys.com>
Subject: Re: [PATCH v2] usb: dwc2: add bus suspend/resume for dwc2

>> The contract for bus_suspend() is that it will suspend all ports not
>> yet suspended, keep track of those ports and then only resume those in
>> bus_resume() (compare, for example, how XHCI keeps track of that with
>> xhci_bus_state.bus_suspended in xhci_bus_suspend/resume()). So you
>> need something here to remember whether this function suspended the
>> port or whether it had already been suspended, and then only resume
>> the port in bus_resume() in the former case.
>
> In fact, the dwc2 controller only support one port, so the hprt0
> is the only one port we need to care.

Yes, I know, but that one port still needs to play by the rules the
USB core expects. All I'm saying is: if the port was already suspended
during bus_suspend(), then the next bus_resume() should not resume it.

The rest looks good to me now. But in order to get it really working,
I think we'll still need the actual driver.pm suspend/resume methods,
at least for the HCD_FLAG_HW_ACCESSIBLE and the
usb_root_hub_lost_power() handling (probably better in a separate
patch).
--
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