zephyr/subsys/usb/device
Alexi Demers 32481b6418 usb: fix wrong capacity report for USB mass storage device
Usb "write" method never copies the input data buffer, it uses the
buffer pointer directly. The fact that it was on the stack made
the buffer ephemeral, and could disappear before the USB transfer
actually occurred. The data transmitted was then random. This commit
converts the transfer buffer to a static buffer, so that it always
exists for the duration of the USB transfer.

Known side-effect: if "read capacity" command is read twice
simultaneously, the same buffer will be used twice. As the capacity of a
USB drive should not change between 2 calls, this side effect can be
ignored.

Signed-off-by: Alexi Demers <alexi.demers@axceta.com>
2024-08-26 17:26:36 -04:00
..
class usb: fix wrong capacity report for USB mass storage device 2024-08-26 17:26:36 -04:00
bos_desc.h usb: bos: cleanup Binary Device Object Store header 2024-05-17 16:25:02 +01:00
bos.c usb: bos: cleanup Binary Device Object Store header 2024-05-17 16:25:02 +01:00
CMakeLists.txt
Kconfig usb: device: add USB_CONFIGURATION_STRING_DESC KConfig option 2024-07-28 07:30:30 +03:00
os_desc.c
os_desc.h
usb_descriptor.c usb: Add missing wMaxPacketSize endian conversions 2024-08-21 18:25:30 +01:00
usb_descriptor.h
usb_device.c everywhere: replace double words 2024-06-25 06:05:35 -04:00
usb_transfer.c
usb_transfer.h
usb_work_q.c
usb_work_q.h