summaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/function/uvc_video.c
diff options
context:
space:
mode:
authorDan Vacura <w36195@motorola.com>2022-10-19 00:50:37 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-10-22 13:30:34 +0300
commit8e8e923a49967b798e7d69f1ce9eff1dd2533547 (patch)
treeca2d15f0dd9636fd544bb735e7a1467ffc44aa41 /drivers/usb/gadget/function/uvc_video.c
parent4db0fbb601361767144e712beb96704b966339f5 (diff)
downloadlinux-8e8e923a49967b798e7d69f1ce9eff1dd2533547.tar.xz
usb: gadget: uvc: fix dropped frame after missed isoc
With the re-use of the previous completion status in 0d1c407b1a749 ("usb: dwc3: gadget: Return proper request status") it could be possible that the next frame would also get dropped if the current frame has a missed isoc error. Ensure that an interrupt is requested for the start of a new frame. Fixes: fc78941d8169 ("usb: gadget: uvc: decrease the interrupt load to a quarter") Cc: <stable@vger.kernel.org> Signed-off-by: Dan Vacura <w36195@motorola.com> Link: https://lore.kernel.org/r/20221018215044.765044-2-w36195@motorola.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/gadget/function/uvc_video.c')
-rw-r--r--drivers/usb/gadget/function/uvc_video.c3
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 bb037fcc90e6..323977716f5a 100644
--- a/drivers/usb/gadget/function/uvc_video.c
+++ b/drivers/usb/gadget/function/uvc_video.c
@@ -431,7 +431,8 @@ static void uvcg_video_pump(struct work_struct *work)
/* Endpoint now owns the request */
req = NULL;
- video->req_int_count++;
+ if (buf->state != UVC_BUF_STATE_DONE)
+ video->req_int_count++;
}
if (!req)