From: Thinh Nguyen <Thinh.Nguyen@synopsys.com>
To: Marco Felsch <m.felsch@pengutronix.de>
Cc: Thinh Nguyen <Thinh.Nguyen@synopsys.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>,
"balbi@kernel.org" <balbi@kernel.org>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"kernel@pengutronix.de" <kernel@pengutronix.de>
Subject: Re: [PATCH] usb: dwc3: gadget: lower informal user notifaction dequeue operation
Date: Thu, 23 Mar 2023 23:41:06 +0000 [thread overview]
Message-ID: <20230323234103.mx7f3pzvbrrguzqe@synopsys.com> (raw)
In-Reply-To: <20230323171931.4085496-1-m.felsch@pengutronix.de>
Hi,
On Thu, Mar 23, 2023, Marco Felsch wrote:
> Printing an error message during usb_ep_dequeue() is more confusing than
> helpful since the usb_ep_dequeue() could be call during unbind() just
> in case that everything is canceld before unbinding the driver. Lower
> the dev_err() message to dev_dbg() to keep the message for developers.
>
> Fixes: fcd2def66392 ("usb: dwc3: gadget: Refactor dwc3_gadget_ep_dequeue")
> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de>
> ---
> drivers/usb/dwc3/gadget.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/usb/dwc3/gadget.c b/drivers/usb/dwc3/gadget.c
> index 89dcfac01235f..6699db26cc7b5 100644
> --- a/drivers/usb/dwc3/gadget.c
> +++ b/drivers/usb/dwc3/gadget.c
> @@ -2106,7 +2106,7 @@ static int dwc3_gadget_ep_dequeue(struct usb_ep *ep,
> }
> }
>
> - dev_err(dwc->dev, "request %pK was not queued to %s\n",
> + dev_dbg(dwc->dev, "request %pK was not queued to %s\n",
> request, ep->name);
> ret = -EINVAL;
> out:
> --
> 2.30.2
>
How were you able to reproduce this error message?
During unbind(), the function driver would typically call to
usb_ep_disable(). Before the call usb_ep_disable() completes, all queued
and incompleted requests are expected to be returned with -ESHUTDOWN.
For you to see this error, this means that the function driver issued
usb_ep_dequeue() to an already disabled endpoint, and the request was
probably already given back.
Even though this error message is not critical and shouldn't affect the
driver's behavior, it's better to fix the function driver to handle this
race.
Thanks,
Thinh
next prev parent reply other threads:[~2023-03-23 23:41 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-23 17:19 Marco Felsch
2023-03-23 23:41 ` Thinh Nguyen [this message]
2023-03-24 8:36 ` Marco Felsch
2023-03-24 17:24 ` Thinh Nguyen
2023-03-27 7:50 ` Marco Felsch
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=20230323234103.mx7f3pzvbrrguzqe@synopsys.com \
--to=thinh.nguyen@synopsys.com \
--cc=balbi@kernel.org \
--cc=gregkh@linuxfoundation.org \
--cc=kernel@pengutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.felsch@pengutronix.de \
/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®