Re: [PATCH v3] usb: dwc3: gadget: don't error on dequeue of a completed request

From: Thinh Nguyen

Date: Fri Sep 04 2026 - 21:22:57 EST


On Sat, Sep 05, 2026, Cole Munz wrote:
> On Fri, Sep 04, 2026, Thinh Nguyen wrote:
> > NAK.
> >
> > This is not a fix. This changes the dequeue() behavior. You're breaking
> > the documented behavior of usb_ep_dequeue():
>
> You're right, the return value is documented and I shouldn't change it.
>
> The part that actually hurts is the dev_err. f_fs dequeues ep0req on
> every teardown on purpose since ce405d561b02, so every unbind logs
>
> dwc3 23000000.usb: request 00000000ad92f1c4 was not queued to ep0out
>
> for a request that completed normally, and that noise buries real
> errors. Would you take a version that keeps the -EINVAL return and only
> lowers the message to dev_dbg when the request is COMPLETED on its own
> endpoint? The never-queued and wrong-endpoint cases would keep the
> dev_err.
>
> If that's not worth doing either, I'll drop it.
>

Why is functionfs_unbind() calling usb_ep_dequeue() unconditionally
after the request has already completed?

The change ce405d561b02 looks like a workaround for a different issue.
Maybe the fix belongs in f_fs instead of dwc3?

BR,
Thinh