From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bear.ext.ti.com ([192.94.94.41]:48165 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932430AbbJNPMt (ORCPT ); Wed, 14 Oct 2015 11:12:49 -0400 From: Felipe Balbi To: , CC: , Jassi Brar Subject: Re: [PATCH] usb: gadget: function: acm: return zlp for OUT setup In-Reply-To: <1444834590-25759-1-git-send-email-jassisinghbrar@gmail.com> References: <1444834590-25759-1-git-send-email-jassisinghbrar@gmail.com> Date: Wed, 14 Oct 2015 10:12:44 -0500 Message-ID: <87mvvlbi1f.fsf@saruman.tx.rr.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: stable-owner@vger.kernel.org List-ID: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, jaswinder.singh@linaro.org writes: > From: Jassi Brar > > We must return 0 for any OUT setup request, otherwise > protocol error may occur. have you seen any such errors ? composite.c treats >=3D0 as success: if (value >=3D 0 && value !=3D USB_GADGET_DELAYED_STATUS) { req->length =3D value; req->context =3D cdev; req->zero =3D value < w_length; value =3D composite_ep0_queue(cdev, req, GFP_ATOMIC); if (value < 0) { DBG(cdev, "ep_queue --> %d\n", value); req->status =3D 0; composite_setup_complete(gadget->ep0, req); } } else if .... We actually NEED to return w_length to cope with the need for ZLPs. Care to describe what problems you have seen and which UDC you were using, what's the exact scenario. How have you tested this ? =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJWHnDtAAoJEIaOsuA1yqRE7aIQAI9TS49/9CvPbNTxOarJDd4F 2slKeC4KmwMyPl1YUiFPqQP04s14Rvzj3Zr3mn+iQ6r9iSnu/k5KqZa8eaBfHI6E /F8dX0XFXB1rOVu9oxUyhtEBlM0VkEGfD3r/+X8ykfZ9+E0g1lgKxJphBBKPKYg+ /LwihQ+HKnDgcV6C6LH4/x7Zm+NkmA90cdDIDu8wENSWCP0we0VWJ1eJFGp0b50O nygouwrW1DM9ujJcXzhtrI/QwzzuyFSJcaU5V/TUkZtexv9gX1S7Ov2crrSdtG6f bsEOkzmoo+OozWtU7DySORYlDW5LNYu04JGYHbITkyG5LA0W/cGi4wsKTNMC2qJQ q+nbKUUZgR/fzoSv6Mx+vDwwyDYHpHkwX+9jRJwhqJFC6mrcpVh1nLlVr4QOoD7h 8t84QNcaIM0PIclaVpTVgpcZT+ONigScjqlRadTTqxSVgGienuQUu/qMF3sfb+U8 HmcgQJcAdODfkkR8fv6te5rFhI1snstRu9bqydTG3O6jR/UbXNrvdbQc1EtYfVD0 jrEt+ubtfjjGhtf7D8NAQ+Edn5QzXZYimkgO5KNqrwAwRvpblzhy9i26xAh3TYcK ipgD/myfGQc9q9uOtNUVnAInSmyv5uvuN/NXYpZiM/EsX8wqq1XnGqlqdl8eR14c yYOB27Fs71xtrfufmCGc =vYgY -----END PGP SIGNATURE----- --=-=-=--