Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix dwc2 issuing disconnect instead of reset #48

Open
xairy opened this issue Aug 20, 2023 · 2 comments
Open

Fix dwc2 issuing disconnect instead of reset #48

xairy opened this issue Aug 20, 2023 · 2 comments
Labels
gadget subsystem Requires changes in USB Gadget subsystem kernel Requires kernel changes

Comments

@xairy
Copy link
Owner

xairy commented Aug 20, 2023

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.

@anomaly256
Copy link

anomaly256 commented Mar 18, 2024

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

@xairy
Copy link
Owner Author

xairy commented Mar 19, 2024

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 xairy added kernel Requires kernel changes gadget subsystem Requires changes in USB Gadget subsystem labels Jun 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gadget subsystem Requires changes in USB Gadget subsystem kernel Requires kernel changes
Projects
None yet
Development

No branches or pull requests

2 participants