From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Wesley Cheng <quic_wcheng@quicinc.com>,
"balbi@kernel.org" <balbi@kernel.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
"quic_jackp@quicinc.com" <quic_jackp@quicinc.com>
Subject: Re: [PATCH 5/5] usb: dwc3: gadget: Increase DWC3 controller halt timeout
Date: Sat, 9 Jul 2022 01:47:50 +0000 [thread overview]
Message-ID: <d61b21f6-5518-9064-57bd-a3141656448b@synopsys.com> (raw)
In-Reply-To: <20220708185007.21743-6-quic_wcheng@quicinc.com>
On 7/8/2022, Wesley Cheng wrote:
> Since EP0 transactions need to be completed before the controller halt
> sequence is finished, this may take some time depending on the host and the
> enabled functions. Increase the controller halt timeout, so that we give
> the controller sufficient time to handle EP0 transfers.
>
> Signed-off-by: Wesley Cheng <quic_wcheng@quicinc.com>
> ---
> drivers/usb/dwc3/gadget.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index fba2797ad9ae..a5c0e39bd002 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -2487,6 +2487,7 @@ static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend)
> do {
> reg = dwc3_readl(dwc->regs, DWC3_DSTS);
> reg &= DWC3_DSTS_DEVCTRLHLT;
> + msleep(1);
I think it makes more sense to msleep() first before reading the register.
Thanks,
Thinh
> } while (--timeout && !(!is_on ^ !reg));
>
> if (!timeout)
prev parent reply other threads:[~2022-07-09 1:48 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-08 18:50 [PATCH 0/5] Fix controller halt and endxfer timeout issues Wesley Cheng
2022-07-08 18:50 ` [PATCH 1/5] usb: dwc3: Do not service EP0 and conndone events if soft disconnected Wesley Cheng
2022-07-08 18:50 ` [PATCH 2/5] usb: dwc3: gadget: Force sending delayed status during soft disconnect Wesley Cheng
2022-07-08 18:50 ` [PATCH 3/5] usb: dwc3: gadget: Adjust IRQ management during soft disconnect/connect Wesley Cheng
2022-07-09 2:26 ` kernel test robot
2022-07-09 4:47 ` kernel test robot
2022-07-08 18:50 ` [PATCH 4/5] usb: dwc3: Allow end transfer commands to be sent during soft disconnect Wesley Cheng
2022-07-09 1:58 ` Thinh Nguyen
2022-07-12 22:08 ` Wesley Cheng
2022-07-13 1:42 ` Thinh Nguyen
2022-07-13 17:45 ` Wesley Cheng
2022-07-14 0:19 ` Thinh Nguyen
2022-07-14 0:33 ` Wesley Cheng
2022-07-14 0:41 ` Thinh Nguyen
2022-07-08 18:50 ` [PATCH 5/5] usb: dwc3: gadget: Increase DWC3 controller halt timeout Wesley Cheng
2022-07-09 1:47 ` Thinh Nguyen [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=d61b21f6-5518-9064-57bd-a3141656448b@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=quic_jackp@quicinc.com \
--cc=quic_wcheng@quicinc.com \
/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
all inboxes | Powered by JetHome®