linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Felipe Balbi <balbi@kernel.org>
To: Li Jun <jun.li@nxp.com>
Cc: gregkh@linuxfoundation.org, linux-usb@vger.kernel.org,
	john.stultz@linaro.org, chenyu56@huawei.com
Subject: Re: [PATCH] usb: dwc3: use readl_poll_timeout_atomic for register polling
Date: Fri, 08 May 2020 15:36:56 +0300	[thread overview]
Message-ID: <87blmymwlz.fsf@kernel.org> (raw)
In-Reply-To: <1588928985-1585-1-git-send-email-jun.li@nxp.com>

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


Hi,

Li Jun <jun.li@nxp.com> writes:

> Introduce dwc3_read_poll_timeout_atomic for register polling to
> simplify code, this way we use time(us) instead of register read
> iteration counter to wait register value change, this is also to
> resolve one ep command timeout issue found on imx8M, Chen Yu also
> encoutered this problem on his Hisilicon Kirin Soc[1], on imx8M,
> some ep command need more time to complete when SS PHY is at P3
> because suspend_clk(32K) is used, trace shows it 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
>
> So set timeout to be 500us for dwc3_send_gadget_ep_cmd().
>
> [1] https://lkml.org/lkml/2019/9/25/754
>
> Signed-off-by: Li Jun <jun.li@nxp.com>

Let's fix the original bug first. This patch is likely to need changes
after that ;-)

-- 
balbi

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

      reply	other threads:[~2020-05-08 12:37 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  9:09 [PATCH] usb: dwc3: use readl_poll_timeout_atomic for register polling Li Jun
2020-05-08 12:36 ` Felipe Balbi [this message]

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=87blmymwlz.fsf@kernel.org \
    --to=balbi@kernel.org \
    --cc=chenyu56@huawei.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=john.stultz@linaro.org \
    --cc=jun.li@nxp.com \
    --cc=linux-usb@vger.kernel.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).