JianyuWang0623 opened a new pull request, #21610:
URL: https://github.com/apache/nuttx/pull/21610
## Summary
`cdcuart_sendbuf()` and `cdcuart_dmasend()` capped every bulk-IN request
to MIN(CONFIG_CDCACM_BULKIN_REQLEN, ep->maxpacket), but the lower half
already splits an oversized submission into maxpacket-sized packets
itself, so the cap wasted most of the allocated buffer (e.g. 4096 vs 512
on HS with CONFIG_CDCACM_BULKIN_REQLEN=4096).
Record the actual per-request capacity in `priv->wrreqlen` at allocation
time in `cdcacm_bind()` and have both send paths use it.
## Impact
CDCACM TX only: each bulk-IN request now carries the full allocated
request buffer instead of at most one maxpacket. No Kconfig, API, or
build changes.
## Testing
- `sim:usbdev` (CONFIG_CDCACM=y) build passes: Ubuntu 22.04.5 LTS, host
gcc 13.4.0.
- `tools/checkpatch.sh -g HEAD~1..HEAD` reports only pre-existing nxstyle
errors in `drivers/usbdev/cdcacm.c`; this patch adds none.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]