lkml.org 
[lkml]   [2020]   [May]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH v4 3/9] usb: dwc3: Increase timeout for CmdAct cleared by device controller
Felipe Balbi <balbi@kernel.org> 于2020年5月8日周五 下午8:35写道:
>
>
> Hi,
>
> Jun Li <lijun.kernel@gmail.com> writes:
> > Jun Li <lijun.kernel@gmail.com> 于2020年5月7日周四 上午11:08写道:
> >>
> >> John Stultz <john.stultz@linaro.org> 于2020年5月7日周四 上午6:27写道:
> >> >
> >> > On Wed, May 6, 2020 at 2:00 AM Jun Li <lijun.kernel@gmail.com> wrote:
> >> > > John Stultz <john.stultz@linaro.org> 于2019年10月30日周三 上午5:18写道:
> >> > > > On Tue, Oct 29, 2019 at 2:11 AM Felipe Balbi <balbi@kernel.org> wrote:
> >> > > > > John Stultz <john.stultz@linaro.org> writes:
> >> > > > > > From: Yu Chen <chenyu56@huawei.com>
> >> > > > > >
> >> > > > > > It needs more time for the device controller to clear the CmdAct of
> >> > > > > > DEPCMD on Hisilicon Kirin Soc.
> >> > > > >
> >> > > > > Why does it need more time? Why is it so that no other platform needs
> >> > > > > more time, only this one? And which command, specifically, causes
> >> > > > > problem?
> >> > >
> >> > > Sorry for my back to this so late.
> >> > >
> >> > > This change is required on my dwc3 based HW too, I gave a check
> >> > > and the reason is suspend_clk is used in case the PIPE phy is at P3,
> >> > > this slow clock makes my EP command below timeout.
> >> > >
> >> > > dwc3_gadget_ep_cmd: ep0out: cmd 'Set Endpoint Configuration' [401]
> >> > > params 00001000 00000500 00000000 --> status: Timed Out
> >> > >
> >> > > Success case takes about 400us to complete, see below trace(44.286278
> >> > > - 44.285897 = 0.000381):
> >> > >
> >> > > configfs_acm.sh-822 [000] d..1 44.285896: dwc3_writel: addr
> >> > > 000000006d59aae1 value 00000401
> >> > > configfs_acm.sh-822 [000] d..1 44.285897: dwc3_readl: addr
> >> > > 000000006d59aae1 value 00000401
> >> > > ... ...
> >> > > configfs_acm.sh-822 [000] d..1 44.286278: dwc3_readl: addr
> >> > > 000000006d59aae1 value 00000001
> >> > > configfs_acm.sh-822 [000] d..1 44.286279: dwc3_gadget_ep_cmd:
> >> > > ep0out: cmd 'Set Endpoint Configuration' [401] params 00001000
> >> > > 00000500 00000000 --> status: Successful
> >> > >
> >> > > Hi John,
> >> > >
> >> > > Do you still have this problem? if yes, What's the value of
> >> > > USBLNKST[21:18] when the timeout happens?
> >> >
> >> > Sorry. As I mentioned, I was working to upstream a patchset that I
> >> > hadn't created, so the context I had was limited. As I couldn't
> >> > reproduce an issue without the change on the device I had, I figured
> >> > it would be best to drop it.
> >>
> >> That was fine.
> >> >
> >> > However, as you have some analysis and rational for why such a change
> >> > would be needed, I don't have an objection to it. Do you want to
> >> > resubmit the patch with your explanation and detailed log above in the
> >> > commit message?
> >>
> >> Sure, I will resubmit the patch with my explanation added in commit message.
> >
> > Hi John
> >
> > A second think of this, I feel use readl_poll_timeout_atomic() to wait by time
> > is more proper here, so I create a new patch to address this also other
> > registers polling, see below patch with you CCed:
> >
> > https://patchwork.kernel.org/patch/11536081/
>
> Fixing a bug has nothing to do with using
> readl_poll_timeout_atomic(). Please don't mix things as it just makes
> review time consuming.
>
> Let's find out what the bug is all about, only then should we consider
> moving over to readl_poll_timeout_atomic().

Agreed, sorry about that, I will hold on my readl_poll_timeout_atomic() changes
until we have a conclusion on this issue fix.

thanks
Li Jun
>
> --
> balbi

\
 
 \ /
  Last update: 2020-05-09 10:29    [W:0.078 / U:2.680 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site