linux-rockchip.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Caesar Wang <caesar.upstream-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Doug Anderson <dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: "Huang, Tao" <huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org>,
	"Heiko Stuebner" <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>,
	"John Youn" <johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>,
	"Felipe Balbi" <balbi-l0cyMroinI0@public.gmane.org>,
	"open list:ARM/Rockchip SoC..."
	<linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org>,
	吴良峰 <wulf-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
Subject: Re: [Bug] usb: dwc2: Add functions to set and clear force mode
Date: Mon, 1 Feb 2016 19:13:15 +0800	[thread overview]
Message-ID: <56AF3DCB.20808@gmail.com> (raw)
In-Reply-To: <56AF3D80.90807-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>



在 2016年02月01日 19:12, Caesar Wang 写道:
> Doug
>
> 在 2016年01月30日 03:11, Doug Anderson 写道:
>> Caesar,
>>
>> On Tue, Jan 26, 2016 at 6:12 PM, Caesar Wang 
>> <caesar.upstream@gmail.com> wrote:
>>> Thanks Doug's reply.
>>>
>>> Cc: Wulf
>>> 在 2016年01月27日 00:05, Doug Anderson 写道:
>>>> Hi,
>>>>
>>>> On Tue, Jan 26, 2016 at 4:02 AM, Caesar Wang <wxt@rock-chips.com> 
>>>> wrote:
>>>>> Hi  John, Felipe
>>>>>
>>>>>
>>>>> I'm no familiar with usb stuff.
>>>>> then I found this patch will break usb working for rk3036 SoCs, maybe
>>>>> more
>>>>> SoCs.
>>>>> Says, U disk can't work on usb host.
>>>>>
>>>>> The failure log:
>>>>>
>>>>>      32.645481] usb usb2-port1: connect-debounce failed
>>>>>
>>>>>
>>>>> Tested by following branch:
>>>>> https://github.com/Caesar-github/rockchip/tree/kylin/next (kernel:
>>>>> 4.5-rc1)
>>>>>
>>>>> Revert "usb: dwc2: Add functions to set and clear force mode" will 
>>>>> work
>>>>> for
>>>>> it.
>>>>>
>>>>>
>>>>> Maybe, someone have some suggestions or ideas?
>>>> Can you check if this series helps you?
>>>>
>>>> http://marc.info/?l=linux-usb&m=145255851516121&w=2
>>>
>>> Unluckily, this series patches can't fix it on rk3036 SoCs.
>>> I revert this CL ("usb: dwc2: Add functions to set and clear force 
>>> mode") to
>>> work firstly.
>> You're 100% positive?  In particular you made sure you had this patch
>> (one of the two in John's series I pointed at), which explicitly
>> mentions fixing a problem with the patch you mention?
>
> I'm 100% positive the John's patches can fix this issue

Sorry, John's patches can't fix this issue.


> As the following verified on
> https://github.com/Caesar-github/rockchip/commits/for-usb-tests
>
> Anyway, Meanwhile if we add the folllowing patch can work for me. I 
> will track it on tomorrow if you have other suggestions.
>
> diff --git a/drivers/usb/dwc2/core.c b/drivers/usb/dwc2/core.c
> index e991d55..90f4abf 100644
> --- a/drivers/usb/dwc2/core.c
> +++ b/drivers/usb/dwc2/core.c
> @@ -637,6 +637,13 @@ int dwc2_core_reset_and_force_dr_mode(struct 
> dwc2_hsotg *hsotg)
>                 return retval;
>
>         dwc2_force_dr_mode(hsotg);
> +
> +       /*
> +        * NOTE: This long sleep is _very_ important, otherwise the 
> core will
> +        * not stay in host mode after a connector ID change!
> +        */
> +        usleep_range(150000, 160000);
> +
>         return 0;
>  }
>
>
>>
>> Author:     John Youn <John.Youn@synopsys.com>
>> AuthorDate: Mon Jan 11 16:32:28 2016 -0800
>>
>>      usb: dwc2: Fix probe problem on bcm2835
>>
>>      Fixes an issue found on Raspberry PI platform that prevents 
>> probe. Don't
>>      skip setting the force mode if it's already set.
>>
>>      Fixes: 09c96980dc72 ("usb: dwc2: Add functions to set and clear 
>> force mode")
>>      Signed-off-by: John Youn <johnyoun@synopsys.com>
>>      Reported-by: Stefan Wahren <stefan.wahren@i2se.com>
>>      Reported-by: Remi Pommarel <repk@triplefau.lt>
>>      Tested-by: Stefan Wahren <stefan.wahren@i2se.com>
>>      Tested-by: Remi Pommarel <repk@triplefau.lt>
>>
>>
>> Maybe try again just in case there was some problem updating your
>> kernel when you tested before?  If you're sure you can reproduce the
>> problem even with John's two patches, perhaps you can give more
>> details about what part of his patch broke things for you.
>>
>> -Doug
>>
>> _______________________________________________
>> Linux-rockchip mailing list
>> Linux-rockchip@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-rockchip
>
>

-- 
Thanks,
Caesar


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

  parent reply	other threads:[~2016-02-01 11:13 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <56A7603C.1000409@rock-chips.com>
     [not found] ` <56A7603C.1000409-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-01-26 16:05   ` [Bug] usb: dwc2: Add functions to set and clear force mode Doug Anderson
     [not found]     ` <CAD=FV=Xk4v=1QMYG9XmXh6hJLKU6i_wVakOArF1du-Z_4_+Neg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-01-27  2:12       ` Caesar Wang
     [not found]         ` <56A8277F.9-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-01-29 19:11           ` Doug Anderson
     [not found]             ` <CAD=FV=Uab6H6sFVj_bPRs7H4HcBi2pqZK3HDCHQxC+EDk=inDA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-02-01 11:12               ` Caesar Wang
     [not found]                 ` <56AF3D80.90807-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2016-02-01 11:13                   ` Caesar Wang [this message]
2016-02-01 23:31                     ` John Youn
     [not found]                       ` <2B3535C5ECE8B5419E3ECBE30077290901DC42FD26-Yu2iAY70zvrYN67daEjeMPufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2016-02-02  2:42                         ` Caesar Wang
     [not found]                           ` <56B01785.3030803-9Onoh4P/yGk@public.gmane.org>
2016-02-02  2:53                             ` Caesar Wang
2016-02-03  0:03                               ` John Youn
     [not found]                                 ` <2B3535C5ECE8B5419E3ECBE30077290901DC431FDB-Yu2iAY70zvrYN67daEjeMPufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2016-02-03  0:35                                   ` Caesar Wang
2016-02-03  1:08                                     ` John Youn
     [not found]                                       ` <2B3535C5ECE8B5419E3ECBE30077290901DC4322F0-Yu2iAY70zvrYN67daEjeMPufCSb+aD3WLzEdoUbNIic@public.gmane.org>
2016-02-03  1:10                                         ` Caesar Wang
2016-02-03  1:32                                           ` John Youn

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=56AF3DCB.20808@gmail.com \
    --to=caesar.upstream-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=balbi-l0cyMroinI0@public.gmane.org \
    --cc=dianders-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org \
    --cc=huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org \
    --cc=johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org \
    --cc=linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org \
    --cc=wulf-TNX95d0MmH7DzftRWevZcw@public.gmane.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).