Re: Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-19 Thread Julius Werner
On Wed, Nov 19, 2014 at 1:47 AM, 李云志 wrote: > hi Julius & Alan > > Shall we use dwc2's private status "hsotg->lx_state" here instesd of > "hcd->state" for checking root hub is in suspend state ? > I see the EHCI driver do something like this(ehci->rh_state == > EHCI_RH_SUSPENDED) before resume

Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-19 Thread Mathias Nyman
On 18.11.2014 18:41, Felipe Balbi wrote: > On Tue, Nov 18, 2014 at 11:07:34AM -0500, Alan Stern wrote: >> On Tue, 18 Nov 2014, Kever Yang wrote: >> >>> After we implement the bus_suspend/resume, auto suspend id enabled. >>> The root hub will be auto suspend if there is no device connected, >>> we n

Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-19 Thread Alan Stern
On Tue, 18 Nov 2014, Julius Werner wrote: > >> You should be aware that it's not safe to use hcd->state for anything > >> in a host controller driver. That field is owned by usbcore, not by > >> the HCD, and it is not protected by any locks. > >> > >> Thus, for example, hcd->state does not get se

Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-18 Thread Julius Werner
>> You should be aware that it's not safe to use hcd->state for anything >> in a host controller driver. That field is owned by usbcore, not by >> the HCD, and it is not protected by any locks. >> >> Thus, for example, hcd->state does not get set to HC_STATE_SUSPENDED >> until some time after the

Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-18 Thread Felipe Balbi
On Tue, Nov 18, 2014 at 11:07:34AM -0500, Alan Stern wrote: > On Tue, 18 Nov 2014, Kever Yang wrote: > > > After we implement the bus_suspend/resume, auto suspend id enabled. > > The root hub will be auto suspend if there is no device connected, > > we need to resume the root hub when a device con

Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-18 Thread Alan Stern
On Tue, 18 Nov 2014, Kever Yang wrote: > After we implement the bus_suspend/resume, auto suspend id enabled. > The root hub will be auto suspend if there is no device connected, > we need to resume the root hub when a device connect detect. > > This patch tested on rk3288. > > Signed-off-by: Roy

Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-17 Thread Felipe Balbi
On Tue, Nov 18, 2014 at 09:21:24AM +0800, Kever Yang wrote: > After we implement the bus_suspend/resume, auto suspend id enabled. > The root hub will be auto suspend if there is no device connected, > we need to resume the root hub when a device connect detect. > > This patch tested on rk3288. >

Re: [PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-17 Thread Doug Anderson
Kever, On Mon, Nov 17, 2014 at 5:21 PM, Kever Yang wrote: > After we implement the bus_suspend/resume, auto suspend id enabled. > The root hub will be auto suspend if there is no device connected, > we need to resume the root hub when a device connect detect. > > This patch tested on rk3288. > >

[PATCH v2] usb: dwc2: resume root hub when device detect with suspend state

2014-11-17 Thread Kever Yang
After we implement the bus_suspend/resume, auto suspend id enabled. The root hub will be auto suspend if there is no device connected, we need to resume the root hub when a device connect detect. This patch tested on rk3288. Signed-off-by: Roy Li Signed-off-by: Kever Yang --- Changes in v2: -