lkml.org 
[lkml]   [2017]   [Oct]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [RESEND PATCH 1/3] usb: dwc3: Don't reinitialize core during host bus-suspend/resume
    Date

    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
    [unhandled content-type:application/pgp-signature]
    \
     
     \ /
      Last update: 2017-10-24 11:37    [W:2.855 / U:0.116 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site