From: Felipe Balbi <balbi@kernel.org>
To: Roger Quadros <rogerq@ti.com>, Manu Gautam <mgautam@codeaurora.org>
Cc: linux-arm-msm@vger.kernel.org, linux-usb@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
open list <linux-kernel@vger.kernel.org>,
linux-omap <linux-omap@vger.kernel.org>
Subject: Re: [RESEND PATCH 1/3] usb: dwc3: Don't reinitialize core during host bus-suspend/resume
Date: Thu, 11 Jan 2018 11:23:05 +0200 [thread overview]
Message-ID: <87a7xkycjq.fsf@linux.intel.com> (raw)
In-Reply-To: <4dea746b-3b7a-7a0e-7136-cb771044e627@ti.com>
[-- Attachment #1: Type: text/plain, Size: 1845 bytes --]
Hi,
Roger Quadros <rogerq@ti.com> writes:
>>> In host mode runtime suspend/resume could happen very often with
>>> device connected, and resetting h/w on every runtime_resume might not
>>> be desired. And PHYs drivers can also support runtime_suspend which
>>> would be preferred instead of shutting down phy.
>>
>> We don't do anything when dwc3 is working as a host, we simply assume if
>> we reach dwc3.ko, xhci has done its part. Here's what our
>> suspend_common looks like:
>>
>> static int dwc3_suspend_common(struct dwc3 *dwc)
>> {
>> unsigned long flags;
>>
>> switch (dwc->current_dr_role) {
>> case DWC3_GCTL_PRTCAP_DEVICE:
>> spin_lock_irqsave(&dwc->lock, flags);
>> dwc3_gadget_suspend(dwc);
>> spin_unlock_irqrestore(&dwc->lock, flags);
>> dwc3_core_exit(dwc);
>> break;
>> case DWC3_GCTL_PRTCAP_HOST:
>> default:
>> /* do nothing */
>> break;
>> }
>>
>> return 0;
>> }
>>
>> We're not resetting anything, not tearing down anything. No idea why
>> you're saying that in host mode we're breaking things apart. If you have
>> out-of-tree patches on top of v4.15-rc7, fix them instead of claiming
>> mainline is at fault.
>>
>
> This is the case after commit 689bf72c6e0d ("usb: dwc3: Don't
> reinitialize core during host bus-suspend/resume") which is breaking
> low power for TI platforms in Host mode.
>
> If we revert that commit we will be doing dwc3_core_exit() for host
> mode as well. Which is what we want for system suspend but probably
> not for runtime suspend in host case.
>
> This is why Manu wants to differentiate runtime vs system suspend.
We already differentiate them. Maybe the only thing we need is to *not*
call core_exit() in host-mode during runtime_suspend, but call it if
mode is device or during system sleep.
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
next prev parent reply other threads:[~2018-01-11 9:23 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-27 11:19 [RESEND PATCH 1/3] usb: dwc3: Don't reinitialize core during host bus-suspend/resume Manu Gautam
2017-09-27 11:19 ` [RESEND PATCH 2/3] usb: dwc3: pci: Runtime resume child device from wq Manu Gautam
2017-09-27 11:19 ` [RESEND PATCH 3/3] usb: dwc3: core: Notify current USB mode to USB3 PHY as well Manu Gautam
2017-10-21 13:47 ` [RESEND PATCH 1/3] usb: dwc3: Don't reinitialize core during host bus-suspend/resume Manu Gautam
2017-10-24 9:35 ` Felipe Balbi
2018-01-10 12:48 ` Roger Quadros
2018-01-10 12:57 ` Felipe Balbi
[not found] ` <876089zxau.fsf-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
2018-01-10 12:59 ` Roger Quadros
2018-01-11 1:41 ` Manu Gautam
2018-01-11 8:14 ` Felipe Balbi
2018-01-11 8:55 ` Manu Gautam
2018-01-11 9:04 ` Felipe Balbi
2018-01-11 9:15 ` Roger Quadros
2018-01-11 9:23 ` Felipe Balbi [this message]
2018-01-15 15:40 ` Roger Quadros
2018-01-16 6:36 ` Manu Gautam
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=87a7xkycjq.fsf@linux.intel.com \
--to=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-omap@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=mgautam@codeaurora.org \
--cc=rogerq@ti.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).