Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756744AbcC2KaN (ORCPT ); Tue, 29 Mar 2016 06:30:13 -0400 Received: from mga14.intel.com ([192.55.52.115]:4106 "EHLO mga14.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751522AbcC2KaJ (ORCPT ); Tue, 29 Mar 2016 06:30:09 -0400 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.24,410,1455004800"; d="asc'?scan'208";a="943586142" From: Felipe Balbi To: "Felipe F. Tonello" , linux-usb@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Michal Nazarewicz , Clemens Ladisch Subject: Re: [PATCH v2] usb: gadget: f_midi: fixed a bug when buflen was smaller than wMaxPacketSize In-Reply-To: <1458753021-27400-1-git-send-email-eu@felipetonello.com> References: <1458753021-27400-1-git-send-email-eu@felipetonello.com> User-Agent: Notmuch/0.21 (http://notmuchmail.org) Emacs/25.0.90.3 (x86_64-pc-linux-gnu) Date: Tue, 29 Mar 2016 13:28:17 +0300 Message-ID: <87lh51shmm.fsf@intel.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2089 Lines: 67 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi, "Felipe F. Tonello" writes: > [ text/plain ] > buflen by default (256) is smaller than wMaxPacketSize (512) in high-speed > devices. > > That caused the OUT endpoint to freeze if the host send any data packet of > length greater than 256 bytes. > > This is an example dump of what happended on that enpoint: > HOST: [DATA][Length=3D260][...] > DEVICE: [NAK] > HOST: [PING] > DEVICE: [NAK] > HOST: [PING] > DEVICE: [NAK] > ... > HOST: [PING] > DEVICE: [NAK] > > Users should not change the buffer size to anything other than wMaxPacket= Size > because that can cause bugs (this bug) or performance issues. Thus, this = patch > fixes this problem by eliminating buflen entirely and replacing it with > wMaxPacketSize of the appropriate endpoint where needed. > > Signed-off-by: Felipe F. Tonello > --- > > v2: > - Removed buflen sounds like removing buflen should be delyed to v4.7 merge window while the fix is, indeed, needed. Can you drop the removal of buflen ? I guess it's mostly about picking v1 and fixing endianess problems ? =2D-=20 balbi --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBAgAGBQJW+ljCAAoJEIaOsuA1yqREovYP/RHcLQNFMEb+BDAVgbtBYGxS 1UporHN1ycBx71qAJVHYNMbmUPhuHlqS+1ougNw4Yo7D8nclvu6JNOMHaZl7hR0R eI5Y2GOVcG4OnDaBeY+ZNcf8VETlVKKTuCgiR/hIuK7EZFFNSMxoug3SLakR/0Jh 0EF5KMTw29aE1FrcA0mUKeqLoy2UnepX1K1AEY/ujY5KKIIBnxANT0tBmORiepk3 4ANn3VwkTtmTnXdn3hdikSU8iGWwjYN8vw1odnMplpqq2DGsy9m2hAj8t5krNJA+ agKCx9WdRS+0DmmtSKACzGwOl+ib59fXb5youeo/6xtNyGmhW1zaHrI+Ovd96tdG FpH/Y/WzYR2D73YqVK34EA1ojXLlr0Uug/q8En8lfm5Ye1TUYHd+0CHf4W421NE7 VVZ8nyu+1MmGNbaAlGnTt6Z054ylN9X77LrzXD88cItG2YDg7mOCcLc33z1p/OMB RVwrlGmPKFBXyp3iEQaXzqMm7K4zS0UxtasXVUgvimvTey7f24lr1JQ8gZVRy3YE BWHMFr9K2tWF/5BIEa9SS4vMMqyho9emmUAC1ATZ/sb+1qEsry/eUfOeyKqQmYfU +mnsuZ4cuXI9NGVfav5x4gHsNbqjdPH/Of77PtYONsr4S414IeuIyl1j646tom+l EcV5ejJUHzUkABMyVqfj =UPYw -----END PGP SIGNATURE----- --=-=-=--