]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
usb: gadget: uvc: add bInterval checking for HS mode
authorPawel Laszczak <pawell@cadence.com>
Mon, 8 Mar 2021 12:53:38 +0000 (13:53 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 22 May 2021 08:38:17 +0000 (10:38 +0200)
commitaae59ae834d3f5f190161b65fcdc98b1d5d327ee
treec821452a3160387aea29bf902b9c7b25391080f7
parent8dce22aee6ae6f1a10c95dde6f06f261d623adc7
usb: gadget: uvc: add bInterval checking for HS mode

[ Upstream commit 26adde04acdff14a1f28d4a5dce46a8513a3038b ]

Patch adds extra checking for bInterval passed by configfs.
The 5.6.4 chapter of USB Specification (rev. 2.0) say:
"A high-bandwidth endpoint must specify a period of 1x125 µs
(i.e., a bInterval value of 1)."

The issue was observed during testing UVC class on CV.
I treat this change as improvement because we can control
bInterval by configfs.

Reviewed-by: Peter Chen <peter.chen@kernel.org>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Pawel Laszczak <pawell@cadence.com>
Link: https://lore.kernel.org/r/20210308125338.4824-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