From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932506AbbJ0OOm (ORCPT ); Tue, 27 Oct 2015 10:14:42 -0400 Received: from mail-wi0-f176.google.com ([209.85.212.176]:32936 "EHLO mail-wi0-f176.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932342AbbJ0OOj (ORCPT ); Tue, 27 Oct 2015 10:14:39 -0400 Subject: Re: [PATCH v4 0/7] USB MIDI Gadget improvements and bug fixes To: linux-usb@vger.kernel.org References: <1445878509-12084-1-git-send-email-eu@felipetonello.com> Cc: linux-kernel@vger.kernel.org, Felipe Balbi , Greg Kroah-Hartman , Andrzej Pietrasiewicz , Clemens Ladisch From: Felipe Ferreri Tonello Message-ID: <562F86CC.4070305@felipetonello.com> Date: Tue, 27 Oct 2015 14:14:36 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <1445878509-12084-1-git-send-email-eu@felipetonello.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Balbi, On 26/10/15 16:55, Felipe F. Tonello wrote: > Patch 7 has changes on how to transmit IN USB requests. It implements a FIFO > of pre-allocated usb requests and uses then as needed, instead of allocating > then on demand. This is my initial implementation and is open for > suggestions and comments. > > Patches 1-6 is pretty much straight forward. > > changes in v4: > - pre-alocation of in requests. > - more code clean up > - fix memory leak on out requests > - configure endpoints only when setting up MIDIStreaming interface > > Felipe F. Tonello (7): > usb: gadget: f_midi: Transmit data only when IN ep is enabled > usb: gadget: f_midi: remove duplicated code > usb: gadget: define free_ep_req as universal function > usb: gadget: f_midi: fix leak on failed to enqueue out requests > usb: gadget: f_midi: set altsettings only for MIDIStreaming interface > usb: gadget: gmidi: Cleanup legacy code > usb: gadget: f_midi: pre-allocate IN requests > > drivers/usb/gadget/function/f_midi.c | 201 ++++++++++++++++++++--------- > drivers/usb/gadget/function/f_sourcesink.c | 6 - > drivers/usb/gadget/function/g_zero.h | 1 - > drivers/usb/gadget/legacy/gmidi.c | 12 +- > drivers/usb/gadget/u_f.c | 8 ++ > drivers/usb/gadget/u_f.h | 3 +- > 6 files changed, 151 insertions(+), 80 deletions(-) > I have rebased this patchset on top of your next branch. It removes the need for patch 1 and patch 5. I am waiting for more comments on other patches to fix things if needed before sending v5. -- Felipe