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>
Thu, 18 Mar 2021 08:02:27 +0000 (09:02 +0100)
commit26adde04acdff14a1f28d4a5dce46a8513a3038b
tree550810240434c7cd5844d141dfe89ef2e7e89b74
parent064ece8d7ca78f7ee5470e553fd3cb71842e0115
usb: gadget: uvc: add bInterval checking for HS mode

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>
drivers/usb/gadget/function/f_uvc.c