mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-10-10 08:03:04 -04:00
Thanks for the SET_ADDRESS rework. I think it leaves one case uncovered:
a host whose first request is SET_ADDRESS ends up with a device whose
interfaces are all numbered 0.
Two things still depend on the core seeing a request before the address arrives:
1. usb_core assigns interfaces and endpoints only on the first control
request it handles in DEFAULT. When SET_ADDRESS comes first, the driver
completes it and usb_core_set_address() moves the state to ADDRESS. So
allocate_interfaces_and_endpoints() never runs.
2. Under USB_DETECT_BY_REQUEST, usb.c enables the class drivers only
on a USB_TRANSFER_COMPLETION event. The SET_ADDRESS status stage now
completes inside the driver, so the drivers are still disabled when the
address arrives.
Change-Id: Ifacb8b07cbdefb0dee3d414c2257a50a08759f3d
|
||
|---|---|---|
| .. | ||
| iap | ||
| usb_audio.c | ||
| usb_audio.h | ||
| usb_audio_def.h | ||
| usb_charging_only.c | ||
| usb_charging_only.h | ||
| usb_class_driver.h | ||
| usb_core.c | ||
| usb_hid.c | ||
| usb_hid.h | ||
| usb_hid_def.h | ||
| usb_hid_usage_tables.h | ||
| usb_iap.c | ||
| usb_iap.h | ||
| usb_serial.c | ||
| usb_serial.h | ||
| usb_storage.c | ||
| usb_storage.h | ||