[RFC PATCH 1/1] media: uvcvideo: reset interface on bulk stream stop

From: Henry Lin

Date: Mon May 25 2026 - 14:23:45 EST


From: Hans Yang <hansy@xxxxxxxxxx>

Some bulk-based UVC devices expect the stream sequence number to be
reset when the video stream is stopped. The driver currently issues
CLEAR_FEATURE(ENDPOINT_HALT) for bulk endpoints, but does not reset the
streaming interface alternate setting to 0 in that path.

When streaming is started again, the device may expect packets to
start from sequence number 0 while the host continues from the
previous transaction, leading to transfer errors such as:

uvcvideo: Non-zero status (-71) in video completion handler.

Reset the streaming interface alternate setting to 0 before clearing
halt, matching the stop path used for isochronous endpoints.

Signed-off-by: Hans Yang <hansy@xxxxxxxxxx>
Signed-off-by: Henry Lin <henryl@xxxxxxxxxx>
---
drivers/media/usb/uvc/uvc_video.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index 2094e059d7d3..20cae606f463 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -2319,9 +2319,8 @@ void uvc_video_stop_streaming(struct uvc_streaming *stream)
{
uvc_video_stop_transfer(stream, 1);

- if (stream->intf->num_altsetting > 1) {
- usb_set_interface(stream->dev->udev, stream->intfnum, 0);
- } else {
+ usb_set_interface(stream->dev->udev, stream->intfnum, 0);
+ if (stream->intf->num_altsetting == 1) {
/*
* UVC doesn't specify how to inform a bulk-based device
* when the video stream is stopped. Windows sends a
--
2.43.0