Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754911AbdCGLBF (ORCPT ); Tue, 7 Mar 2017 06:01:05 -0500 Received: from mga09.intel.com ([134.134.136.24]:37476 "EHLO mga09.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754659AbdCGLA5 (ORCPT ); Tue, 7 Mar 2017 06:00:57 -0500 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,258,1484035200"; d="asc'?scan'208";a="1105720681" From: Felipe Balbi To: Laurent Pinchart , Roger Quadros Cc: b-liu@ti.com, nsekhar@ti.com, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] uvc-gadget: Fix Set Interface (alternate setting) response behaviour In-Reply-To: <3028836.5DEGZBmlnn@avalon> References: <1488539835-11851-1-git-send-email-rogerq@ti.com> <3028836.5DEGZBmlnn@avalon> Date: Tue, 07 Mar 2017 12:57:40 +0200 Message-ID: <87bmtd1hi3.fsf@linux.intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2675 Lines: 73 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, Laurent Pinchart writes: > Hi Roger, > > Thank you for the patch. > > On Friday 03 Mar 2017 13:17:15 Roger Quadros wrote: >> On alternate setting change, webcam gadget sends us a UVC_EVENT_STREAMON >> or UVC_EVENT_STREAMOFF event. It expects delayed status response on >> STREAMON event only but doesn't expect us to send that response over USB. >> It sends the delayed response when we issue the VIDIOC_STREAMON ioctl. >> >> So we must not send UVCIOC_SEND_RESPONSE ioctl in these cases that too >> with invalid response length. > > The commit message only explains why we should not call UVCIOC_SEND_RESPO= NSE=20 > in response to a STREAMON event, but not why we shouldn't either in respo= nse=20 > to a STREAMOFF event. The patch is correct changing both, but I propose=20 > wording the above two paragraphs as follows. > > "uvc-gadget: Do not send Set Interface (alternate setting) response twice > > On alternate setting change, the webcam gadget sends us a UVC_EVENT_STREA= MON=20 > or UVC_EVENT_STREAMOFF event. In the first case, the driver will issue a= =20 > delayed status response automatically when we call the VIDIOC_STREAMON io= ctl.=20 > In the second case, the driver sends the status response immediately. We = must=20 > thus not send the status response manually with UVCIOC_SEND_RESPONSE in a= ny of=20 > those cases." > > If you're fine with that I'll change the message when applying, there's n= o=20 > need to resend the patch. I have this in my testing/fixes and was planning to send it to Greg this week. I can drop it from my queue, no problem, but then let me know as you would need my acked-by. =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEElLzh7wn96CXwjh2IzL64meEamQYFAli+kiQACgkQzL64meEa mQaFfw//Yn8asGPNLtHC+/gw37DLU056obRl3XeK++Mek+JSO+dIp4eaSe+0oT+Q YEXoP16+XvhNT+K5pkebV+zgLUFDVpQu2sFvqezjvksU+kvbKk5WjqMcsv6KkbEK VbP+IkucHVABF+lf+mtQotMAy4dzAccP+sY7CCvZ+SDjvnukrKJGa6xRBaNDoS6d 8aBQ1T7m6ok7cDzsg3eh5ZWyP1P/kTF5jFnwi+uyH3OGy7r7NnFHqnFnpu8VtMFm s9hJenHKbB3Sgnu3GwPHn4gnP63hFnchbG1pKGzUS8j3boQuT2ySkzS02QmUmDXE DnKQ8fbIaozRTiQ7YLa7tbsClpqCcncfUm+0V2rWLTddtyonEFHR51XhsYFeE3r3 gRztdHhHwDuIg5tYdNPrFVz3rT7VFW19nhfRlbbNw5O1z1MXIr7Zf7U1mI2fdW+e T1grrZqTlyeWxhYcxeiHYYuvtlGQgyrdJz7kl7ZSUQeQ77NwK4GYUzTufu2ntwKb SqPWwwBe8soC4edi9hp9kKooRdqicoqZ8SWg4fePJosi/wyXnUAIuT6nwlMqHblB WtocKJoDKRPMDkFbZyNvaqltZEMHKByQwvoRyyP+XoPUhSTB+KJ2WEm/wYNqDBZ7 dOdYnwPz2ZxVojrAPK2onmiCuXJRNvyizOx3Dt/NyQI4rQKpQxs= =sWyD -----END PGP SIGNATURE----- --=-=-=--