* [PATCH] Revert "usb: gadget: uvc: Add missing call for additional setup data"
@ 2017-04-11 6:12 Manish Narani
2017-04-11 6:59 ` Felipe Balbi
0 siblings, 1 reply; 4+ messages in thread
From: Manish Narani @ 2017-04-11 6:12 UTC (permalink / raw)
To: git-dev; +Cc: anirudh, Roger Quadros, stable, Felipe Balbi
From: Roger Quadros <rogerq@ti.com>
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
Cc: <stable@vger.kernel.org> # v4.9+
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Roger Quadros <rogerq@ti.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
---
drivers/usb/gadget/function/f_uvc.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
index 27ed51b..29b41b5 100644
--- a/drivers/usb/gadget/function/f_uvc.c
+++ b/drivers/usb/gadget/function/f_uvc.c
@@ -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;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Revert "usb: gadget: uvc: Add missing call for additional setup data"
2017-04-11 6:12 [PATCH] Revert "usb: gadget: uvc: Add missing call for additional setup data" Manish Narani
@ 2017-04-11 6:59 ` Felipe Balbi
0 siblings, 0 replies; 4+ messages in thread
From: Felipe Balbi @ 2017-04-11 6:59 UTC (permalink / raw)
To: Manish Narani, git-dev; +Cc: anirudh, Roger Quadros, stable
[-- Attachment #1: Type: text/plain, Size: 979 bytes --]
Hi,
Manish Narani <manish.narani@xilinx.com> writes:
> From: Roger Quadros <rogerq@ti.com>
>
> 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
>
> Cc: <stable@vger.kernel.org> # v4.9+
> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> Signed-off-by: Roger Quadros <rogerq@ti.com>
> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
this is not how you send patches to stable. Please read
stable-kernel-rules.rst
--
balbi
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Revert "usb: gadget: uvc: Add missing call for additional setup data"
2017-03-02 8:44 Roger Quadros
@ 2017-03-02 10:49 ` Laurent Pinchart
0 siblings, 0 replies; 4+ messages in thread
From: Laurent Pinchart @ 2017-03-02 10:49 UTC (permalink / raw)
To: Roger Quadros; +Cc: balbi, petr.cvek, b-liu, linux-usb, linux-kernel, # v4 . 9+
Hi Roger,
Thank you for the patch.
On Thursday 02 Mar 2017 10:44:58 Roger Quadros wrote:
> 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
>
> Cc: <stable@vger.kernel.org> # v4.9+
> Signed-off-by: Roger Quadros <rogerq@ti.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
> drivers/usb/gadget/function/f_uvc.c | 7 -------
> 1 file changed, 7 deletions(-)
>
> diff --git a/drivers/usb/gadget/function/f_uvc.c
> b/drivers/usb/gadget/function/f_uvc.c index 27ed51b..29b41b5 100644
> --- a/drivers/usb/gadget/function/f_uvc.c
> +++ b/drivers/usb/gadget/function/f_uvc.c
> @@ -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;
> }
--
Regards,
Laurent Pinchart
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH] Revert "usb: gadget: uvc: Add missing call for additional setup data"
@ 2017-03-02 8:44 Roger Quadros
2017-03-02 10:49 ` Laurent Pinchart
0 siblings, 1 reply; 4+ messages in thread
From: Roger Quadros @ 2017-03-02 8:44 UTC (permalink / raw)
To: laurent.pinchart, balbi
Cc: petr.cvek, b-liu, linux-usb, linux-kernel, Roger Quadros, # v4 . 9+
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
Cc: <stable@vger.kernel.org> # v4.9+
Signed-off-by: Roger Quadros <rogerq@ti.com>
---
drivers/usb/gadget/function/f_uvc.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c
index 27ed51b..29b41b5 100644
--- a/drivers/usb/gadget/function/f_uvc.c
+++ b/drivers/usb/gadget/function/f_uvc.c
@@ -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;
}
--
2.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-11 7:00 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-11 6:12 [PATCH] Revert "usb: gadget: uvc: Add missing call for additional setup data" Manish Narani
2017-04-11 6:59 ` Felipe Balbi
-- strict thread matches above, loose matches on Subject: below --
2017-03-02 8:44 Roger Quadros
2017-03-02 10:49 ` Laurent Pinchart
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.