Skip to contentSkip to conversation

patch "Revert "usb: gadget: uvc: Add missing call for additional setup data"" added to usb-linus

PATCH [email protected] 1 participant 1 message Mar 9, 2017

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

Revert "usb: gadget: uvc: Add missing call for additional setup data"

to my usb git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb.git
in the usb-linus branch.

The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.)

The patch will hopefully also be merged in Linus's tree for the next -rc kernel release.

If you have any questions about this process, please let me know.

Quoted 1 line

From eb38d913c27f32f4df173791051fecf6aca34173 Mon Sep 17 00:00:00 2001

From: Roger Quadros <[email protected]>
Date: Thu, 2 Mar 2017 10:44:58 +0200
Subject: Revert "usb: gadget: uvc: Add missing call for additional setup data"

This reverts commit 4fbac5206afd01b717d4bdc58793d471f3391b4b.

This commit breaks g_webcam when used with uvc-gadget [1].

The user space application (e.g. uvc-gadget) is responsible for sending response to UVC class specific requests on control endpoint in uvc_send_response() in uvc_v4l2.c.

The bad commit was causing a duplicate response to be sent with incorrect response data thus causing UVC probe to fail at the host and broken control transfer endpoint at the gadget.

[1] - git://git.ideasonboard.org/uvc-gadget.git

---
 drivers/usb/gadget/function/f_uvc.c | 7 -------
 1 file changed, 7 deletions(-)
drivers/usb/gadget/function/f_uvc.c +0 -7
index 27ed51b5082f..29b41b5dee04 100644
@@ -258,13 +258,6 @@ uvc_function_setup(struct usb_function *f, const struct usb_ctrlrequest *ctrl)
 	memcpy(&uvc_event->req, ctrl, sizeof(uvc_event->req));
 	v4l2_event_queue(&uvc->vdev, &v4l2_event);
 
-	/* Pass additional setup data to userspace */
-	if (uvc->event_setup_out && uvc->event_length) {
-		uvc->control_req->length = uvc->event_length;
-		return usb_ep_queue(uvc->func.config->cdev->gadget->ep0,
-			uvc->control_req, GFP_ATOMIC);
-	}
-
 	return 0;
 }
 
Signature · 1 line
2.12.0