You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by xi...@apache.org on 2024/04/23 14:02:10 UTC
(nuttx) 01/11: drivers/usbdev_fs: when the device is not opened, the received data is retained.
This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
commit e3a6368c9a24f564b2757aca94850c71d890e1e3
Author: sunkun3 <su...@xiaomi.com>
AuthorDate: Mon Nov 27 16:53:35 2023 +0800
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 <do...@xiaomi.com>
---
drivers/usbdev/usbdev_fs.c | 10 +---------
1 file changed, 1 insertion(+), 9 deletions(-)
diff --git a/drivers/usbdev/usbdev_fs.c b/drivers/usbdev/usbdev_fs.c
index 65ffdc5d39..e7b1bc0982 100644
--- a/drivers/usbdev/usbdev_fs.c
+++ b/drivers/usbdev/usbdev_fs.c
@@ -263,15 +263,7 @@ static void usbdev_fs_rdcomplete(FAR struct usbdev_ep_s *ep,
usbtrace(TRACE_CLASSRDCOMPLETE, sq_count(&fs_ep->reqq));
- /* Restart request due to either no reader or
- * empty frame received.
- */
-
- if (fs_ep->crefs == 0)
- {
- uwarn("drop frame\n");
- goto restart_req;
- }
+ /* Restart request due to empty frame received */
if (req->xfrd <= 0)
{