From: "Peter Chen (Qualcomm)" <peter.chen@kernel.org>
To: Jiale Yao <yaojiale02@163.com>
Cc: Pawel Laszczak <pawell@cadence.com>,
Roger Quadros <rogerq@kernel.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Felipe Balbi <felipe.balbi@linux.intel.com>,
linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] usb: cdns3: report endpoint reset timeout
Date: Thu, 8 Oct 2026 19:17:11 -0700 [thread overview]
Message-ID: <ashOp1L9Jq-tcdTN@hu-petche-lv.qualcomm.com> (raw)
In-Reply-To: <20261003081152.433499-1-yaojiale02@163.com>
On 26-10-03 16:11:52, Jiale Yao wrote:
> cdns3_gadget_ep_disable() discards the endpoint reset poll result and
> then tests ret, which is still zero. A reset timeout is therefore
> neither reported nor returned to the caller.
>
> Store the poll result in ret so the existing diagnostic and return path
> expose the timeout.
>
> Fixes: 7733f6c32e36 ("usb: cdns3: Add Cadence USB3 DRD Driver")
> Signed-off-by: Jiale Yao <yaojiale02@163.com>
Add: Cc: stable@vger.kernel.org, otherwise:
Acked-by: Peter Chen <peter.chen@kernel.org>
Peter
> ---
> drivers/usb/cdns3/cdns3-gadget.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/usb/cdns3/cdns3-gadget.c b/drivers/usb/cdns3/cdns3-gadget.c
> index 42311c1bfada..53cc535309c5 100644
> --- a/drivers/usb/cdns3/cdns3-gadget.c
> +++ b/drivers/usb/cdns3/cdns3-gadget.c
> @@ -2530,9 +2530,9 @@ static int cdns3_gadget_ep_disable(struct usb_ep *ep)
> !(val & EP_STS_DBUSY), 1, 10);
> writel(EP_CMD_EPRST, &priv_dev->regs->ep_cmd);
>
> - readl_poll_timeout_atomic(&priv_dev->regs->ep_cmd, val,
> - !(val & (EP_CMD_CSTALL | EP_CMD_EPRST)),
> - 1, 1000);
> + ret = readl_poll_timeout_atomic(&priv_dev->regs->ep_cmd, val,
> + !(val & (EP_CMD_CSTALL | EP_CMD_EPRST)),
> + 1, 1000);
> if (unlikely(ret))
> dev_err(priv_dev->dev, "Timeout: %s resetting failed.\n",
> priv_ep->name);
> --
> 2.34.1
>
--
Thanks,
Peter Chen
prev parent reply other threads:[~2026-10-09 2:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 8:11 [PATCH] usb: cdns3: report endpoint reset timeout Jiale Yao
2026-10-09 2:17 ` Peter Chen (Qualcomm) [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=ashOp1L9Jq-tcdTN@hu-petche-lv.qualcomm.com \
--to=peter.chen@kernel.org \
--cc=felipe.balbi@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=pawell@cadence.com \
--cc=rogerq@kernel.org \
--cc=yaojiale02@163.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