Skip to content

Commit 88c8e05

Browse files
committed
Revert "usb: gadget: uvc: limit isoc_sg to super speed gadgets"
This reverts commit 1990524. 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 <[email protected]> Cc: stable <[email protected]> Fixes: 1990524 ("usb: gadget: uvc: limit isoc_sg to super speed gadgets") Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 5aed5b7 commit 88c8e05

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

drivers/usb/gadget/function/uvc_queue.c

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,12 @@ static int uvc_buffer_prepare(struct vb2_buffer *vb)
8484
return -ENODEV;
8585

8686
buf->state = UVC_BUF_STATE_QUEUED;
87-
buf->sgt = vb2_dma_sg_plane_desc(vb, 0);
88-
buf->sg = buf->sgt->sgl;
89-
buf->mem = vb2_plane_vaddr(vb, 0);
87+
if (queue->use_sg) {
88+
buf->sgt = vb2_dma_sg_plane_desc(vb, 0);
89+
buf->sg = buf->sgt->sgl;
90+
} else {
91+
buf->mem = vb2_plane_vaddr(vb, 0);
92+
}
9093
buf->length = vb2_plane_size(vb, 0);
9194
if (vb->type == V4L2_BUF_TYPE_VIDEO_CAPTURE)
9295
buf->bytesused = 0;

drivers/usb/gadget/function/uvc_video.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -459,9 +459,6 @@ static void uvcg_video_pump(struct work_struct *work)
459459
*/
460460
int uvcg_video_enable(struct uvc_video *video, int enable)
461461
{
462-
struct uvc_device *uvc = video->uvc;
463-
struct usb_composite_dev *cdev = uvc->func.config->cdev;
464-
struct usb_gadget *gadget = cdev->gadget;
465462
unsigned int i;
466463
int ret;
467464

@@ -493,11 +490,9 @@ int uvcg_video_enable(struct uvc_video *video, int enable)
493490
if (video->max_payload_size) {
494491
video->encode = uvc_video_encode_bulk;
495492
video->payload_size = 0;
496-
} else {
497-
video->encode = (video->queue.use_sg &&
498-
!(gadget->speed <= USB_SPEED_HIGH)) ?
493+
} else
494+
video->encode = video->queue.use_sg ?
499495
uvc_video_encode_isoc_sg : uvc_video_encode_isoc;
500-
}
501496

502497
video->req_int_count = 0;
503498

0 commit comments

Comments
 (0)