drivers/usbdev_fs: when the device is not opened, the received data is retained.
It is up to the app to determine whether the data is valid when opened Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
parent
1b7a95c756
commit
e3a6368c9a
@ -263,15 +263,7 @@ static void usbdev_fs_rdcomplete(FAR struct usbdev_ep_s *ep,
|
|||||||
|
|
||||||
usbtrace(TRACE_CLASSRDCOMPLETE, sq_count(&fs_ep->reqq));
|
usbtrace(TRACE_CLASSRDCOMPLETE, sq_count(&fs_ep->reqq));
|
||||||
|
|
||||||
/* Restart request due to either no reader or
|
/* Restart request due to empty frame received */
|
||||||
* empty frame received.
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (fs_ep->crefs == 0)
|
|
||||||
{
|
|
||||||
uwarn("drop frame\n");
|
|
||||||
goto restart_req;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (req->xfrd <= 0)
|
if (req->xfrd <= 0)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user