This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[参考译文] Linux/AM3352:USB 小工具驱动程序 RX 缓冲区大小

Guru**** 2560240 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/processors-group/processors/f/processors-forum/598139/linux-am3352-usb-gadget-driver-rx-buffer-size

器件型号:AM3352

工具/软件:Linux

我为 AM335X 定制板编写 USB 小工具函数驱动程序、并使用批量输入/输出传输

USB 请求缓冲 区分配 kmalloc 缓冲区大小超过2K 字节;

当 PC 发送828字节数据时、"USB Request->Complete"函数
获取 USB Rx 数据长度(req->actual)为“828”

但是、如果 PC 发送了829byte (大于828)、则会显示"USB Request->Complete"函数
获取 USB Rx 数据长度(req->actual)为“0”

问题是什么?