Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755924AbcCOJss (ORCPT ); Tue, 15 Mar 2016 05:48:48 -0400 Received: from smtprelay05.ispgateway.de ([80.67.31.99]:58904 "EHLO smtprelay05.ispgateway.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751401AbcCOJsj (ORCPT ); Tue, 15 Mar 2016 05:48:39 -0400 Subject: Re: [PATCH] usb: gadget: f_midi: Fixed a bug when buflen was smaller than wMaxPacketSize To: Felipe Ferreri Tonello , Michal Nazarewicz , linux-usb@vger.kernel.org References: <1457552370-29404-1-git-send-email-eu@felipetonello.com> <56E6E00C.6070907@felipetonello.com> Cc: linux-kernel@vger.kernel.org, Felipe Balbi , Robert Baldyga From: Clemens Ladisch Message-ID: <56E7DA72.1090109@ladisch.de> Date: Tue, 15 Mar 2016 10:48:34 +0100 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <56E6E00C.6070907@felipetonello.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Df-Sender: bGludXgtdXNiQGNsLmRvbWFpbmZhY3Rvcnkta3VuZGUuZGU= Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 793 Lines: 21 Felipe Ferreri Tonello wrote: > On 11/03/16 23:07, Michal Nazarewicz wrote: >> I’m also wondering whether it would be beneficial to get rid of buflen >> all together and use wMaxPacketSie for in endpoints as well? Is that >> feasible? > > Yes, we could just remove the buflen parameter. > > The only scenario where I can see buflen been "useful" is if the user > wants to have a smaller buffer size for the OUT endpoint. Should we > support this case or not? Splitting data into multiple packets would not make sense from a performance perspective. The only possible reason would be to work around a (theoretical) bug in some host software that does not handle larger buffers, but there aren't that many host implementations, and I am not aware of any with such a bug. Regards, Clemens