diff options
author | Michael Grzeschik <[email protected]> | 2024-02-14 00:37:54 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-02-17 17:08:45 +0100 |
commit | ab9ffa51d5a2f3145839ca59354b3f74d18f7e85 (patch) | |
tree | 549480cf25c5cae3e8a13b646630d40f5f4da8cd | |
parent | 58da4e57cb2980c9405575c8de937ebe4ed02202 (diff) |
usb: gadget: uvc: dont drop frames if zero length packages are late
If the request that was missed was zero bytes long, it
is likely that the overall transferred frame was not affected.
So don't flag the frame incomplete in that case.
Signed-off-by: Michael Grzeschik <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/usb/gadget/function/uvc_video.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/usb/gadget/function/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c index ff7c1fa5c48f..d677d7daa187 100644 --- a/drivers/usb/gadget/function/uvc_video.c +++ b/drivers/usb/gadget/function/uvc_video.c @@ -398,7 +398,8 @@ uvc_video_complete(struct usb_ep *ep, struct usb_request *req) case -EXDEV: uvcg_dbg(&video->uvc->func, "VS request missed xfer.\n"); - queue->flags |= UVC_QUEUE_DROP_INCOMPLETE; + if (req->length != 0) + queue->flags |= UVC_QUEUE_DROP_INCOMPLETE; break; case -ESHUTDOWN: /* disconnect from host. */ |