usb: gadget: uvc: limit isoc_sg to super speed gadgets
authorMichael Grzeschik <m.grzeschik@pengutronix.de>
Mon, 17 Oct 2022 22:11:41 +0000 (00:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 25 Oct 2022 17:06:13 +0000 (19:06 +0200)
commit19905240aef0181d1e6944070eb85fce75f75bcd
tree92e1fa478b6de86f64ef793d68d957e63ccebb0a
parentfb8f60dd1b67520e0e0d7978ef17d015690acfc1
usb: gadget: uvc: limit isoc_sg to super speed gadgets

The overhead of preparing sg data is high for transfers with limited
payload. When transferring isoc over high-speed usb the maximum payload
is rather small which is a good argument no to use sg. This patch is
changing the uvc_video_encode_isoc_sg encode function only to be used
for super speed gadgets.

Signed-off-by: Michael Grzeschik <m.grzeschik@pengutronix.de>
Cc: stable <stable@kernel.org>
Link: https://lore.kernel.org/r/20221017221141.3134818-1-m.grzeschik@pengutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/function/uvc_queue.c
drivers/usb/gadget/function/uvc_video.c