From: "Fang, Yuan" <Yuan.Fang@verisilicon.com>
To: Greg KH <gregkh@linuxfoundation.org>, Yuan Fang <fangyuanseu@gmail.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"balbi@kernel.org" <balbi@kernel.org>
Subject: 答复: [PATCH] drivers/usb/dwc3: Set PHY ready after soft reset done
Date: Fri, 11 Jun 2021 07:34:48 +0000 [thread overview]
Message-ID: <678AD2A4F5F78445B722FED0965FE327776E40AB@SHASXM06.verisilicon.com> (raw)
In-Reply-To: <YMMP9KuZs3RD3xzC@kroah.com>
Hi Maintainer,
Thanks so much for the quick reply.
I would like to back ported to older kernels, but I can not
figure out to which version is suitable, I can have a check later
But merge into the new release version is also acceptable as I think.
Thanks again.
B.R
Yuan Fang
-----邮件原件-----
发件人: Greg KH [mailto:gregkh@linuxfoundation.org]
发送时间: 2021年6月11日 15:26
收件人: Yuan Fang
抄送: linux-usb@vger.kernel.org; balbi@kernel.org; Fang, Yuan
主题: Re: [PATCH] drivers/usb/dwc3: Set PHY ready after soft reset done
On Fri, Jun 11, 2021 at 03:18:05PM +0800, Yuan Fang wrote:
> It's more safe to set PHY ready after soft reset done
>
> Let's consider a test case like this:
> I have a usb PHY which don't need SW initial before access it, But i
> have a wrong PHY clock default setting in PHY register which means PHY
> is not ready in fact.
> in dwc3_core_init, dwc3_core_get_phy will return 0 despite usb get
> PHYs with return -ENODEV, and set phys_ready=true but at this point,
> we can not say phys is ready or at least it not safe to do that.
> then, go on with dwc3_core_soft_reset,dwc3 reset core and PHY, as
> phy->init is NULL in this case, so, usb_phy_init do nothing and go on
> with a while loop which cost 1000*
> 20 ms, and return with -ETIMEDOUT
> check phys_ready is set to TRUE but actually not.
> Move phys_ready after soft reset done is more reasonable and don't see
> side-effect yet.
>
> Signed-off-by: Yuan Fang <yuan.fang@verisilicon.com>
What commit does this "fix"? Should it also be backported to older kernels? If so, how far back?
thanks,
greg k-h
next prev parent reply other threads:[~2021-06-11 7:34 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-11 7:18 [PATCH] drivers/usb/dwc3: Set PHY ready after soft reset done Yuan Fang
2021-06-11 7:25 ` Greg KH
2021-06-11 7:34 ` Fang, Yuan [this message]
2021-06-11 13:02 ` Felipe Balbi
2021-06-16 2:55 ` 答复: " Fang, Yuan
2021-06-29 2:42 ` Fang, Yuan
2021-09-07 11:01 ` Fang, Yuan
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=678AD2A4F5F78445B722FED0965FE327776E40AB@SHASXM06.verisilicon.com \
--to=yuan.fang@verisilicon.com \
--cc=balbi@kernel.org \
--cc=fangyuanseu@gmail.com \
--cc=gregkh@linuxfoundation.org \
--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).