rockbox/firmware/usbstack
Aidan MacDonald bd7b54a3c4 usb: Attempt to handle overlapped control requests in legacy drivers
It seems connecting an iPod Video to a Mac triggers the null
request check, resulting in a panic. Ignoring the error with
a bare return "fixes" it and allows the iPod to connect. This
isn't ideal though, because it could silently introduce bugs
on other targets.

The likely cause of this is the host sending control requests
too fast, or a driver problem (the Video uses the ARC driver,
which is still on the legacy interface), with multiple requests
getting queued at once. Since the USB core expects to deal with
only one request at a time, the second response trips the check.

Try to handle this situation a bit more gracefully by detecting
overlapped requests and returning a STALL to the host when it
occurs. At this point the USB stack is able to safely handle a
new request.

Link: https://forums.rockbox.org/index.php/topic,54414.0.html
Change-Id: I9a2b7e35620ff540ebdb39f81671377062a4917d
2023-01-18 14:22:26 -05:00
..
usb_charging_only.c usb PACK_DATA: use a static inline to enable type checking 2011-12-29 21:58:34 +00:00
usb_charging_only.h
usb_class_driver.h usb: add request data argument to all control request handlers 2021-10-16 21:14:42 +01:00
usb_core.c usb: Attempt to handle overlapped control requests in legacy drivers 2023-01-18 14:22:26 -05:00
usb_hid.c usb: ensure RX buffers are a multiple of the packet size 2021-10-16 21:14:42 +01:00
usb_hid.h usb: add request data argument to all control request handlers 2021-10-16 21:14:42 +01:00
usb_hid_usage_tables.h usb_hid: add support for Battery Strength 2021-03-06 04:15:02 +00:00
usb_serial.c usb: ensure RX buffers are a multiple of the packet size 2021-10-16 21:14:42 +01:00
usb_serial.h usb: add request data argument to all control request handlers 2021-10-16 21:14:42 +01:00
usb_storage.c Remove buflib allocation names, part two 2023-01-13 10:32:54 +00:00
usb_storage.h usb: add request data argument to all control request handlers 2021-10-16 21:14:42 +01:00