Re: [PATCH 2/2] wifi: mm81x: clear a stalled bulk endpoint before the next transfer
From: YuanZhe Liu
Date: Tue Nov 24 2026 - 03:16:40 EST
> I applied patch #1, but this one seems .. interesting. Have you run
> into this problem? Do you have a reproducer?
Hi Lachlan,
Thanks for taking patch 1.
No - not on a real MM81x, and I do not have a reproducer. I should have
been explicit about that in the cover letter. Let me describe what we
actually saw, so you can judge whether the patch makes sense.
The path involved is the register/memory access path:
mm81x_hw_otp_read() -> mm81x_reg32_read() -> mm81x_usb_mem_read()
mm81x_usb_cmd() cmd urb on the bulk OUT endpoint, wait
usb_submit_urb() data urb on the bulk IN endpoint
wait_event_interruptible_timeout()
completion callback musb->errors = urb->status
We drove this against a USB device model that can answer an individual
transfer with STALL or IOERROR instead of data. On the guest side those
complete as -EPIPE and -EPROTO on the data urb; the driver stores the
status in musb->errors and reports it up the stack, and that is the
"nonzero write bulk status received: -32" line in our logs.
The important part is what the model does next: it answers every
transfer independently. The next transfer either gets a freshly injected
status or completes normally, so the endpoint is never left in a halted
state. The model therefore cannot exhibit the failure this patch is
about - after -EPIPE its endpoint simply works again.
So the statement that the endpoint stays halted is from the USB spec, not
from observation: a bulk endpoint that returned STALL remains halted
until the host sends CLEAR_FEATURE(ENDPOINT_HALT), and on xHCI a stall
only resets the host-side ring. Whether MM8108 can leave these endpoints
in that state, or whether a STALL on this interface always means the link
is gone, is something you would know much better than we can tell from
here - so we would rather leave the decision to you.
Any of these is fine with us:
- drop 2/2; patch 1 stands on its own and we can resend this one if a
stall ever shows up in the field;
- keep it if you consider a bulk STALL reachable and want the driver to
recover instead of failing every later transfer on that endpoint;
- or go the other way and treat -EPIPE on the bulk pipes the same way
mm81x_usb_urb_status_is_disconnect() already treats the status
interrupt: mark the chip unresponsive and stop retrying.
Just tell us which direction you prefer and we will follow it.
Thanks,
YuanZhe