From patchwork Thu Mar 2 08:44:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roger Quadros X-Patchwork-Id: 94766 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp64166qgd; Thu, 2 Mar 2017 00:45:41 -0800 (PST) X-Received: by 10.98.32.24 with SMTP id g24mr1729832pfg.115.1488444341603; Thu, 02 Mar 2017 00:45:41 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id v10si157498pgc.143.2017.03.02.00.45.41; Thu, 02 Mar 2017 00:45:41 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754582AbdCBIpU (ORCPT + 25 others); Thu, 2 Mar 2017 03:45:20 -0500 Received: from fllnx210.ext.ti.com ([198.47.19.17]:22447 "EHLO fllnx210.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754342AbdCBIpQ (ORCPT ); Thu, 2 Mar 2017 03:45:16 -0500 Received: from dflxv15.itg.ti.com ([128.247.5.124]) by fllnx210.ext.ti.com (8.15.1/8.15.1) with ESMTP id v228j4VZ016847; Thu, 2 Mar 2017 02:45:04 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ti.com; s=ti-com-17Q1; t=1488444304; bh=kJh7Y3aBXcNAVdi9MBp9aSZsVOppmJ5XyawsJLMdMl4=; h=From:To:CC:Subject:Date; b=RLrAhhrDdKaiBiblEsOIIKHHWOi88ASFQGffUguBOpovK8QYl1EQsUB7dMqLypqkq GTCXfre9OsupnM/01/znCuvmfxF531jy08ReHUhBlP1itQCYng/6Z6TcmCRE+D6cap G2y7RnAWtKTTWDFwT1TDQ8KS3bw8aq2Q6o5mZ6RA= Received: from DFLE72.ent.ti.com (dfle72.ent.ti.com [128.247.5.109]) by dflxv15.itg.ti.com (8.14.3/8.13.8) with ESMTP id v228j3jo004051; Thu, 2 Mar 2017 02:45:04 -0600 Received: from dlep33.itg.ti.com (157.170.170.75) by DFLE72.ent.ti.com (128.247.5.109) with Microsoft SMTP Server id 14.3.294.0; Thu, 2 Mar 2017 02:45:03 -0600 Received: from lta0400828d.ti.com (ileax41-snat.itg.ti.com [10.172.224.153]) by dlep33.itg.ti.com (8.14.3/8.13.8) with ESMTP id v228j08T003013; Thu, 2 Mar 2017 02:45:01 -0600 From: Roger Quadros To: , CC: , , , , Roger Quadros , "# v4 . 9+" Subject: [PATCH] Revert "usb: gadget: uvc: Add missing call for additional setup data" Date: Thu, 2 Mar 2017 10:44:58 +0200 Message-ID: <1488444298-10394-1-git-send-email-rogerq@ti.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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: # v4.9+ Signed-off-by: Roger Quadros --- drivers/usb/gadget/function/f_uvc.c | 7 ------- 1 file changed, 7 deletions(-) -- 2.7.4 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; }