Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1460209

Re: [PATCH v2] usb: core: Add runtime resume checking in choose_wakeup()

From Peter Chen <hzpeterchen@gmail.com>
Newsgroups linux.kernel
Subject Re: [PATCH v2] usb: core: Add runtime resume checking in choose_wakeup()
Date 2016-08-11 09:20 +0200
Message-ID <s4Srv-5i-1@gated-at.bofh.it> (permalink)
References <s4HZ8-1pa-43@gated-at.bofh.it> <s4HZ8-1pa-41@gated-at.bofh.it> <s4OHg-5JF-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Aug 11, 2016 at 11:11:08AM +0800, Baolin Wang wrote:
> On 10 August 2016 at 22:31, Alan Stern <stern@rowland.harvard.edu> wrote:
> > On Wed, 10 Aug 2016, Baolin Wang wrote:
> >
> >> Considering strict power management for mobile device, we should also power
> >> off the usb controller if there are no slaves attached even though it is usb
> >> host function, but it will meet usb device resume failure in below situation.
> >>
> >> Suppose that no slave attached ----> usb interface runtime suspend ---->
> >> usb device runtime suspend -----> xhci suspend -----> power off usb controller.
> >> After that if the system wants to enter suspend state, then it also will issue
> >> usb_dev_suspend(), then the pm_runtime_resume() issued in choose_wakeup()
> >> function will return '-ESHUTDOWN' due to xhci has been suspend and hardware is
> >> not accessible.
> >
> > No, this is wrong.  The pm_runtime_resume in choose_wakeup() should
> > cause the xHCI controller to resume also.
> 
> But now it won't, it just resume usb device not xHCI controller. I
> suppose mainline kernel does not sopport this now.
> 

Why? It works ok at my environment. The controller is the ancestor of
the USB device, if the USB device would like to be woken up, the
controller will be woken up first.

-- 

Best Regards,
Peter Chen

Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Re: [PATCH v2] usb: core: Add runtime resume checking in choose_wakeup() Alan Stern <stern@rowland.harvard.edu> - 2016-08-10 22:10 +0200
  Re: [PATCH v2] usb: core: Add runtime resume checking in choose_wakeup() Baolin Wang <baolin.wang@linaro.org> - 2016-08-11 05:20 +0200
    Re: [PATCH v2] usb: core: Add runtime resume checking in  choose_wakeup() Peter Chen <hzpeterchen@gmail.com> - 2016-08-11 09:20 +0200
      Re: [PATCH v2] usb: core: Add runtime resume checking in choose_wakeup() Baolin Wang <baolin.wang@linaro.org> - 2016-08-11 09:40 +0200

csiph-web