libpayload: usb: Fix several minor USB stack bugs
This patch fixes the following minor bugs in the USB stack:
1. Ensure that all dynamically allocated device structures are cleaned
on detachment, and that the device address is correctly released again.
2. Make sure MSC and HID drivers notice missing endpoints and actually
detach the device in that case (to prevent it from being used).
3. Make sure XHCI-specific set_address() cleans up all data structures
4. Fix broken Slot ID range check that prevented XHCI devices from being
correctly cleaned up.
Signed-off-by: Julius Werner <firstname.lastname@example.org>
Reviewed-by: Stefan Reinauer <email@example.com>
Commit-Queue: Ronald Minnich <firstname.lastname@example.org>
Tested-by: Ronald Minnich <email@example.com>
4 files changed