mirror of
https://github.com/apache/nuttx.git
synced 2026-05-29 04:19:37 +08:00
drivers/usbdev: stop read when container length is less than the maximum length.
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
This commit is contained in:
@@ -644,6 +644,16 @@ static ssize_t usbdev_fs_read(FAR struct file *filep, FAR char *buffer,
|
|||||||
|
|
||||||
PANIC();
|
PANIC();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The container buffer length is less than the maximum length.
|
||||||
|
* It is an independent packet of requests and needs to be
|
||||||
|
* returned directly.
|
||||||
|
*/
|
||||||
|
|
||||||
|
if (reqlen < fs_ep->ep->maxpacket)
|
||||||
|
{
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
nxmutex_unlock(&fs_ep->lock);
|
nxmutex_unlock(&fs_ep->lock);
|
||||||
|
|||||||
Reference in New Issue
Block a user