summaryrefslogtreecommitdiff
path: root/drivers/usb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-10-26 15:09:06 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-10-26 15:09:06 +0300
commit88c8e05ed5c0f05a637e654bbe4e49a1ebe7013c (patch)
tree45bdf31861ac2465b281416651817ebd4ca110a5 /drivers/usb
parent5aed5b7c2430ce318a8e62f752f181e66f0d1053 (diff)
downloadlinux-88c8e05ed5c0f05a637e654bbe4e49a1ebe7013c.tar.xz
Revert "usb: gadget: uvc: limit isoc_sg to super speed gadgets"
This reverts commit 19905240aef0181d1e6944070eb85fce75f75bcd. It was a new feature, and it doesn't even work properly yet, so revert it from this branch as it is not needed for 6.1-final. Cc: Michael Grzeschik <m.grzeschik@pengutronix.de> Cc: stable <stable@kernel.org> Fixes: 19905240aef0 ("usb: gadget: uvc: limit isoc_sg to super speed gadgets") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb')
-rw-r--r--drivers/usb/gadget/function/uvc_queue.c9
-rw-r--r--drivers/usb/gadget/function/uvc_video.c9
2 files changed, 8 insertions, 10 deletions
diff --git a/drivers/usb/gadget/function/uvc_queue.c b/drivers/usb/gadget/function/uvc_queue.c
index 782eaae93140..0aa3d7e1f3cc 100644
--- a/drivers/usb/gadget/function/uvc_queue.c
+++ b/drivers/usb/gadget/function/uvc_queue.c
@@ -84,9 +84,12 @@ static int uvc_buffer_prepare(struct vb2_buffer *vb)
return -ENODEV;
buf->state = UVC_BUF_STATE_QUEUED;
- buf->sgt = vb2_dma_sg_plane_desc(vb, 0);
- buf->sg = buf->sgt->sgl;
- buf->mem = vb2_plane_vaddr(vb, 0);
+ if (queue->use_sg) {
+ buf->sgt = vb2_dma_sg_plane_desc(vb, 0);
+ buf->sg = buf->sgt->sgl;
+ } else {
+ buf->mem = vb2_plane_vaddr(vb, 0);
+ }
buf->length = vb2_plane_size(vb, 0);
if (vb->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
buf->bytesused = 0;
diff --git a/drivers/usb/gadget/function/uvc_video.c b/drivers/usb/gadget/function/uvc_video.c
index b6ea600b0111..dd1c6b2ca7c6 100644
--- a/drivers/usb/gadget/function/uvc_video.c
+++ b/drivers/usb/gadget/function/uvc_video.c
@@ -459,9 +459,6 @@ static void uvcg_video_pump(struct work_struct *work)
*/
int uvcg_video_enable(struct uvc_video *video, int enable)
{
- struct uvc_device *uvc = video->uvc;
- struct usb_composite_dev *cdev = uvc->func.config->cdev;
- struct usb_gadget *gadget = cdev->gadget;
unsigned int i;
int ret;
@@ -493,11 +490,9 @@ int uvcg_video_enable(struct uvc_video *video, int enable)
if (video->max_payload_size) {
video->encode = uvc_video_encode_bulk;
video->payload_size = 0;
- } else {
- video->encode = (video->queue.use_sg &&
- !(gadget->speed <= USB_SPEED_HIGH)) ?
+ } else
+ video->encode = video->queue.use_sg ?
uvc_video_encode_isoc_sg : uvc_video_encode_isoc;
- }
video->req_int_count = 0;