nuttx/arch/arm
Petteri Aimonen 3c610d5d70 STM32 USB OTGFSDEV: Fix handling of SETUP OUT longer than 64 bytes.
For example Windows RNDIS driver issues SETUP requests that are 76 bytes
long. Previously NuttX would read them all, but only if they arrive at
the same time. If host transfer scheduling causes a pause between the
two DATA packets, stm32_ep0out_receive() would proceed with an incomplete
transfer. The rest of the data could either be skipped by the error handler
branch, or be left in NAK state forever, stopping any further communication
on the endpoint.

This commit changes it so that the whole transfer has to be received before
SETUP handler is called. Depending on CONFIG_USBDEV_SETUP_MAXDATASIZE any
excess bytes will be discarded, but doing this in a controlled way ensures
deterministic behavior. In the specific case of RNDIS, the trailing bytes
are unused padding bytes and can be safely discarded.
2021-03-24 11:12:40 -07:00
..
include arch: arm: include: nxstyle fixes 2021-03-22 19:28:38 -07:00
src STM32 USB OTGFSDEV: Fix handling of SETUP OUT longer than 64 bytes. 2021-03-24 11:12:40 -07:00
Kconfig stm32l5: Architecture Support for STM32L5 2021-03-16 12:04:00 -07:00