3c610d5d70
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. |
||
---|---|---|
.. | ||
include | ||
src | ||
Kconfig |