linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: 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>
Subject: Re: [RESEND PATCH 1/3] usb: dwc3: Don't reinitialize core during host bus-suspend/resume
Date: Tue, 24 Oct 2017 12:35:02 +0300	[thread overview]
Message-ID: <877evkhos9.fsf@linux.intel.com> (raw)
In-Reply-To: <d116762a-2a3f-6b32-06a1-66a98ed9aa62@codeaurora.org>

[-- Attachment #1: Type: text/plain, Size: 1593 bytes --]


Hi,

Manu Gautam <mgautam@codeaurora.org> writes:
> Hi Felipe,
>
> Let me know if patches in this series look fine to you.

It does, I just don't have means to test this as intel's platform
doesn't give SW access to PHYs.

I was hoping someone from TI would give a tested-by, but it's too
late. We'll just take this series and fix any possible bugs during the
-rc cycle.

Just one question below

> On 9/27/2017 4:49 PM, 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.
>>
>> Signed-off-by: Manu Gautam <mgautam@codeaurora.org>
>> ---
>>  drivers/usb/dwc3/core.c | 43 ++++++++++++++++++++-----------------------
>>  1 file changed, 20 insertions(+), 23 deletions(-)
>>
>> diff --git a/drivers/usb/dwc3/core.c b/drivers/usb/dwc3/core.c
>> index 03474d3..f75613f 100644
>> --- a/drivers/usb/dwc3/core.c
>> +++ b/drivers/usb/dwc3/core.c
>> @@ -927,6 +927,7 @@ static int dwc3_core_init_mode(struct dwc3 *dwc)
>>  
>>  	switch (dwc->dr_mode) {
>>  	case USB_DR_MODE_PERIPHERAL:
>> +		dwc->current_dr_role = DWC3_GCTL_PRTCAP_DEVICE;

seems like this could be done inside dwc3_set_prtcap(), no?

We can do that as a separate patch too. No issues.

-- 
balbi

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  reply	other threads:[~2017-10-24  9:35 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 [this message]
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
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=877evkhos9.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-usb@vger.kernel.org \
    --cc=mgautam@codeaurora.org \
    /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).