linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Manu Gautam <mgautam@codeaurora.org>
To: Felipe Balbi <balbi@kernel.org>, Roger Quadros <rogerq@ti.com>
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 14:25:24 +0530	[thread overview]
Message-ID: <a30be8a0-63ee-da02-f7a2-4958b7ee35bf@codeaurora.org> (raw)
In-Reply-To: <87r2qwyfp9.fsf@linux.intel.com>

Hi Felipe,


On 1/11/2018 1:44 PM, Felipe Balbi wrote:
> Hi,
>
> Manu Gautam <mgautam@codeaurora.org> writes:
>>> On 27/09/17 14:19, Manu Gautam wrote:
>>>> Driver powers-off PHYs and reinitializes DWC3 core and gadget on
>>>> resume. While this works fine for gadget mode but in host
>>>> mode there is not re-initialization of host stack. Also, resetting
>>>> bus as part of bus_suspend/resume is not correct which could affect
>>>> (or disconnect) connected devices.
>>>> Fix this by not reinitializing core on suspend/resume in host mode
>>>> for HOST only and OTG/drd configurations.
>>>>
>>> All this seems correct but we (TI) were relying on dwc3_core_exit() to be called
>>> during dwc3_suspend() to have the lowest power state for our platforms.
>>>
>>> After this patch, DWC3 controller and PHYs won't be turned off thus
>>> preventing our platform from reaching low power levels.
>>>
>>> So this is a regression for us (TI) in v4.15-rc.
>>>
>>> Felipe, do you agree?
>>>
>>> If yes I can send a patch which fixes the regression
>>> and also makes USB host work after suspend/resume.
>>>
>> I think it will be better to separate runtime_suspend and pm_suspend handling for
>> host mode in dwc3. Powering offf/on PHYs and dwc3_core_exit/init across system
>> suspend-resume should be ok but doing that for runtime suspend-resume is not
>> correct.
> it sure is. It's part of hibernation-while-disconnected programming sequence
>
>> Let me know if that sounds ok, I can provide a patch for same instead of
>> reverting this which affects runtime PM with dwc3 host.
> nope, that would break platforms using hibernation

Please don't mind me asking this if it is very basic, I am probably missing something there
We should be able to distinguish between runtime_pm vs system_suspend/hibernation
and then process accordingly.
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.


-- 
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project

  reply	other threads:[~2018-01-11  8:55 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 [this message]
2018-01-11  9:04         ` Felipe Balbi
2018-01-11  9:15           ` Roger Quadros
2018-01-11  9:23             ` Felipe Balbi
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=a30be8a0-63ee-da02-f7a2-4958b7ee35bf@codeaurora.org \
    --to=mgautam@codeaurora.org \
    --cc=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=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).