Re: [PATCH] xhci: keep ep0 blocked after disconnect until Address Device reloads it
From: Yiyu Zhou
Date: Tue Oct 27 2026 - 14:42:58 EST
On Tue, 27 Oct 2026 12:36:26 +0200, Mathias Nyman wrote:
> There are cases where EP_DROP_PENDING won't be cleared at all in this patch.
You are right. xhci_setup_device() returns early with "Slot already in
default state" for the SETUP_CONTEXT_ONLY call from hub_enable_device(),
before my new clear, and Reset Device leaves the slot in that state. I
missed that early return. ep0 then stays blocked, and usbcore only gets
out of it by re-enumerating the device.
On Tue, 27 Oct 2026 11:58:05 +0100, Michal Pecio wrote:
> You seem to suggest that xhci-hcd should trick usbcore into abandoning
> "resuscitation", right?
Yes, that was the effect, and I agree it is the wrong place for it. It
would also re-enumerate devices that recover from an in-place reset on
7.2, which is a bigger change than I weighed.
Please drop this patch. I can't judge the controller side of the plan
in your mail, but I am happy to test it. My HHKB covers the original
disconnect hang, and Dennis's Keychron covers the reset case. If it
helps, I can also turn steps 1 and 2 into an RFC to test with, unless
you have already started on them.
-YZ