From: Peter Chen <hzpeterchen@gmail.com>
To: Baolin Wang <baolin.wang@linaro.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
Greg KH <gregkh@linuxfoundation.org>,
stefan.koch10@gmail.com, Oliver Neukum <oneukum@suse.com>,
Muhammad Falak R Wani <falakreyaz@gmail.com>,
Mark Brown <broonie@kernel.org>, USB <linux-usb@vger.kernel.org>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: core: Add runtime resume checking
Date: Thu, 11 Aug 2016 16:44:30 +0800 [thread overview]
Message-ID: <20160811084430.GF18967@shlinux2> (raw)
In-Reply-To: <CAMz4kuJWZa1b8c9RjsLq9+xkw3f6GeK1Ly7nAMd1dN78iqKQiQ@mail.gmail.com>
On Thu, Aug 11, 2016 at 04:41:27PM +0800, Baolin Wang wrote:
> >> >>
> >> >> OK. But that is a real problem. It will pm_runtime_resume() falied
> >> >> (issued in choose_wakeup()), cause usb controller has powered-off and
> >> >> xHCI controller has suspended and we have no method to notify the user
> >> >> to power-on USB controller. Any good suggestion to solve this, Alan
> >> >> and Peter? Thanks.
> >> >>
> >> >
> >> > Maybe you can show us the call stack why pm_runtime_resume has failed
> >> > at your environment.
> >>
> >> OK. I try to explain it at below:
> >>
> >> For example: No slave attached----> usb interface runtime suspend
> >> ----> usb device runtime suspend (routine is:
> >> usb_suspend_device()--->generic_suspend() --> hcd_bus_suspend()-->
> >> xhci_bus_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() function (issued in choose_wakeup() function) will
> >> return -ESHUTDOWN due to xhci has been suspend and hardware is not accessible.
> >>
> >> We issue the pm_runtime_resume() function routine: usb_resume_device()
> >> ----> generic_resume() ----> hcd_bus_resume() ---> xhci_bus_resume(),
> >> but now xHCI is not accessible due to xhci_suspend() is issued and USB
> >> controller is power off when no slave attached. That is why
> >> pm_runtime_resume failed.
> >>
> >
> > What host controller driver you are using? Assume you are using
> > xhci-plat.c. The problem for you is this driver does not implement
>
> Yes. I use xhci-plat.c.
>
> > runtime pm operations, so the flag HCD_FLAG_HW_ACCESSIBLE is not set.
> > Maybe Robert's patch is a good start for you [1]
> >
> > [1] http://www.spinics.net/lists/linux-usb/msg144602.html
>
> OK. Maybe I need to implement the runtime PM callbacks for xhci-plat, right?
>
I think so.
--
Best Regards,
Peter Chen
next prev parent reply other threads:[~2016-08-11 8:53 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-09 9:33 [PATCH] usb: core: Add runtime resume checking Baolin Wang
2016-08-09 10:26 ` Greg KH
2016-08-10 2:33 ` Baolin Wang
2016-08-10 6:18 ` Peter Chen
2016-08-10 6:43 ` Baolin Wang
2016-08-10 9:07 ` Peter Chen
2016-08-10 9:35 ` Baolin Wang
2016-08-10 14:25 ` Alan Stern
2016-08-11 3:08 ` Baolin Wang
2016-08-11 6:54 ` Peter Chen
2016-08-11 8:07 ` Baolin Wang
2016-08-11 8:19 ` Peter Chen
2016-08-11 8:41 ` Baolin Wang
2016-08-11 8:44 ` Peter Chen [this message]
2016-08-11 9:08 ` Baolin Wang
[not found] ` <20160810081707.GB7753@kroah.com>
2016-08-10 8:23 ` Baolin Wang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160811084430.GF18967@shlinux2 \
--to=hzpeterchen@gmail.com \
--cc=baolin.wang@linaro.org \
--cc=broonie@kernel.org \
--cc=falakreyaz@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=oneukum@suse.com \
--cc=stefan.koch10@gmail.com \
--cc=stern@rowland.harvard.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.