Re: [PATCH v2] usb: hcd: Add a usb_device argument to hc_driver.endpoint_reset()
From: Greg Kroah-Hartman
Date: Tue Apr 15 2025 - 08:26:43 EST
On Tue, Apr 15, 2025 at 11:10:03AM +0200, Michal Pecio wrote:
> xHCI needs usb_device here, so it stored it in host_endpoint.hcpriv,
> which proved problematic due to some unexpected call sequences from
> USB core, and generally made the code more complex than it has to be.
>
> Make USB core supply it directly and simplify xhci_endpoint_reset().
> Use the xhci_check_args() helper for preventing resets of emulated
> root hub endpoints and for argument validation.
>
> Update other drivers which also define such callback to accept the
> new argument and ignore it, as it seems to be of no use for them.
>
> This fixes a 6.15-rc1 regression reported by Paul, which I was able
> to reproduce, where xhci_hcd doesn't handle endpoint_reset() after
> endpoint_disable() not followed by add_endpoint(). If a configured
> device is reset, stalling endpoints start to get stuck permanently.
As this fixes a bug, can you add a Fixes: tag with the needed
information?
thanks,
greg k-h