raw-gadget icon indicating copy to clipboard operation
raw-gadget copied to clipboard

Fix dwc2 issuing disconnect instead of reset

Open xairy opened this issue 2 years ago • 2 comments

Not a bug in Raw Gadget but still related to its usage.

dwc2 calls the gadget driver's ->disconnect() callback when the port to which the device is connected gets reset by the host (via SET_FEATURE/PORT_RESET). It should call ->reset() instead.

Asked kernel maintainers about getting this fixed, see here.

xairy avatar Aug 20 '23 00:08 xairy

Hi, was there ever any progress on this? I suspect I might be hitting it in my project. I see an alleged device reset then disconnect. Admittedly I don't know enough about the stack to know for sure what the issue is though.

Using rpi 4b (dwc2) and usb mass storage

Mar 18 00:44:29 host usb-proxy[1435]: Resent Bulk transfer on EP02 for attempt 1. length(1024), transferred(1024)
Mar 18 00:44:29 host usb-proxy[1435]: EP2(bulk_out): device likely reset, stopping thread
Mar 18 00:44:29 host usb-proxy[1435]: End reading thread for EP02, thread id(1709)
Mar 18 00:44:29 host usb-proxy[1435]: event: disconnect
Mar 18 00:44:29 host usb-proxy[1435]: Resetting device

edit: I see you mention testing with dummy_hcd on another issue, I'll give that a go before blaming dwc2

anomaly256 avatar Mar 18 '24 00:03 anomaly256

usb-proxy has a quirk to account for this dwc2 behavior, so I suspect your issue is something else.

Wrt the progress: I never got a response from the maintainers, so no progress.

xairy avatar Mar 19 '24 12:03 xairy