usb: webcam: Invalid size of Processing Unit Descriptor
authorPawel Laszczak <pawell@cadence.com>
Mon, 15 Mar 2021 07:17:48 +0000 (08:17 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 11 May 2021 12:47:17 +0000 (14:47 +0200)
commitba637773a9f9b3d95a2f4b0adee764e37ed2bd0b
treee1a1e0381aa52959e189ce0613d3fa46e35133d3
parent930d586646cf7688b2f7291a54b50506b9006389
usb: webcam: Invalid size of Processing Unit Descriptor

[ Upstream commit 6a154ec9ef6762c774cd2b50215c7a8f0f08a862 ]

According with USB Device Class Definition for Video Device the
Processing Unit Descriptor bLength should be 12 (10 + bmControlSize),
but it has 11.

Invalid length caused that Processing Unit Descriptor Test Video form
CV tool failed. To fix this issue patch adds bmVideoStandards into
uvc_processing_unit_descriptor structure.

The bmVideoStandards field was added in UVC 1.1 and it wasn't part of
UVC 1.0a.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Reviewed-by: Peter Chen <peter.chen@kernel.org>
Link: https://lore.kernel.org/r/20210315071748.29706-1-pawell@gli-login.cadence.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/usb/gadget/function/f_uvc.c
drivers/usb/gadget/legacy/webcam.c
include/uapi/linux/usb/video.h