Patch "media: uvcvideo: Return -EIO for control errors" has been added to the 5.14-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    media: uvcvideo: Return -EIO for control errors

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     media-uvcvideo-return-eio-for-control-errors.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 1befe52728d32bc72bcf512055f59823bc3fb864
Author: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
Date:   Fri Jun 18 14:29:09 2021 +0200

    media: uvcvideo: Return -EIO for control errors
    
    [ Upstream commit ffccdde5f0e17d2f0d788a9d831a027187890eaa ]
    
    The device is doing something unexpected with the control. Either because
    the protocol is not properly implemented or there has been a HW error.
    
    Fixes v4l2-compliance:
    
    Control ioctls (Input 0):
                    fail: v4l2-test-controls.cpp(448): s_ctrl returned an error (22)
            test VIDIOC_G/S_CTRL: FAIL
                    fail: v4l2-test-controls.cpp(698): s_ext_ctrls returned an error (22)
            test VIDIOC_G/S/TRY_EXT_CTRLS: FAIL
    
    Reviewed-by: Hans Verkuil <hverkuil-cisco@xxxxxxxxx>
    Signed-off-by: Ricardo Ribalda <ribalda@xxxxxxxxxxxx>
    Signed-off-by: Laurent Pinchart <laurent.pinchart@xxxxxxxxxxxxxxxx>
    Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/media/usb/uvc/uvc_video.c b/drivers/media/usb/uvc/uvc_video.c
index e16464606b140..9f37eaf28ce7e 100644
--- a/drivers/media/usb/uvc/uvc_video.c
+++ b/drivers/media/usb/uvc/uvc_video.c
@@ -115,6 +115,11 @@ int uvc_query_ctrl(struct uvc_device *dev, u8 query, u8 unit,
 	case 5: /* Invalid unit */
 	case 6: /* Invalid control */
 	case 7: /* Invalid Request */
+		/*
+		 * The firmware has not properly implemented
+		 * the control or there has been a HW error.
+		 */
+		return -EIO;
 	case 8: /* Invalid value within range */
 		return -EINVAL;
 	default: /* reserved or unknown */



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux