Re: [PATCH v4 1/7] usb: gadget: f_midi: Transmit data only when IN ep is enabled

2015-10-26 Thread Felipe Tonello
Hi Robert, On Mon, Oct 26, 2015 at 10:13 PM, Robert Baldyga wrote: > Hi Felipe, > > On 10/26/2015 05:55 PM, Felipe F. Tonello wrote: >> This makes sure f_midi doesn't try to enqueue data when the IN endpoint is >> disabled, ie, USB cable is disconnected. >> >>

Re: [PATCH v4 4/7] usb: gadget: f_midi: fix leak on failed to enqueue out requests

2015-10-26 Thread Felipe Tonello
Hi Robert, On Mon, Oct 26, 2015 at 10:23 PM, Robert Baldyga wrote: > On 10/26/2015 05:55 PM, Felipe F. Tonello wrote: >> This patch fixes a memory leak that occurs when an endpoint fails to enqueue >> the request. If that happens the complete function will never be

Re: [PATCH v4 5/7] usb: gadget: f_midi: set altsettings only for MIDIStreaming interface

2015-10-26 Thread Felipe Tonello
Hi Robert, On Mon, Oct 26, 2015 at 10:30 PM, Robert Baldyga wrote: > On 10/26/2015 05:55 PM, Felipe F. Tonello wrote: >> This avoids duplication of USB requests for OUT endpoint and >> re-enabling endpoints. >> >> Signed-off-by: Felipe F. Tonello

Re: [PATCH v3 1/4] usb: gadget: f_midi: free usb request when done

2015-10-12 Thread Felipe Tonello
Hi Balbi, On Sun, Oct 11, 2015 at 8:08 PM, Clemens Ladisch <clem...@ladisch.de> wrote: > Felipe Balbi wrote: >> Clemens Ladisch <clem...@ladisch.de> writes: >>> Felipe Tonello wrote: >>>> req->actual == req->length means that there is no data left t

Re: [PATCH v3 1/4] usb: gadget: f_midi: free usb request when done

2015-10-12 Thread Felipe Tonello
Hi Clemens On Fri, Oct 9, 2015 at 10:23 AM, Clemens Ladisch <clem...@ladisch.de> wrote: > Felipe Tonello wrote: >> req->actual == req->length means that there is no data left to enqueue, > > This condition is not checked in the patch. > >> so free the re

Re: [PATCH v3 1/4] usb: gadget: f_midi: free usb request when done

2015-10-12 Thread Felipe Tonello
Hi Clemens On Mon, Oct 12, 2015 at 11:16 AM, Clemens Ladisch <clem...@ladisch.de> wrote: > Felipe Tonello wrote: >> On Fri, Oct 9, 2015 at 10:23 AM, Clemens Ladisch <clem...@ladisch.de> wrote: >>> Felipe Tonello wrote: >>>>

Re: [PATCH v3 0/4] USB MIDI Gadget bug fixes and improvements

2015-10-08 Thread Felipe Tonello
On Tue, Sep 29, 2015 at 1:01 PM, Felipe F. Tonello wrote: > Here is the third version of this patch set. It includes memory leakage bug > fix, improvements and code cleanups. > > Felipe F. Tonello (4): > usb: gadget: f_midi: free usb request when done > usb: gadget:

Re: [PATCH 3/3] usb: gadget: f_midi: free request when usb_ep_queue fails

2015-09-25 Thread Felipe Tonello
On Thu, Sep 24, 2015 at 2:20 AM, Peter Chen <peter.c...@freescale.com> wrote: > On Wed, Sep 23, 2015 at 12:40:46PM +0100, Felipe Tonello wrote: >> Hi Peter, >> >> On Wed, Sep 23, 2015 at 8:09 AM, Peter Chen <peter.c...@freescale.com> wrote: >> > On Tue,

Re: [PATCH v2 1/3] usb: chipidea: core: fix when building without CONFIG_PM support

2015-09-25 Thread Felipe Tonello
Hi Peter, On Thu, Sep 24, 2015 at 2:17 AM, Peter Chen wrote: > On Wed, Sep 23, 2015 at 12:56:58PM +0100, Felipe F. Tonello wrote: >> If CONFIG_PM or CONFIG_PM_SLEEP is not set, driver will not compile >> properly. >> > > Would you post the warning or error messages? > >

Re: [PATCH v2 2/3] usb: gadget: f_midi: free usb request when done

2015-09-25 Thread Felipe Tonello
Hi Peter, On Thu, Sep 24, 2015 at 2:38 AM, Peter Chen wrote: > On Wed, Sep 23, 2015 at 01:01:44PM +0100, Felipe F. Tonello wrote: >> req->actual == req->length means that there is no data left to enqueue, >> so free the request. >> >> Signed-off-by: Felipe F. Tonello

Re: Problems with printk logs and my driver

2015-09-25 Thread Felipe Tonello
On Thu, Sep 24, 2015 at 9:51 PM, Alan Stern wrote: > On Thu, 24 Sep 2015, Jiri Kosina wrote: > >> On Wed, 23 Sep 2015, Alan Stern wrote: >> >> > Your mistake was thinking that the driver for your keyboard is usbkbd. >> > It isn't. It's usbhid, as you can see in the

Re: [PATCH 3/3] usb: gadget: f_midi: free request when usb_ep_queue fails

2015-09-25 Thread Felipe Tonello
On Fri, Sep 25, 2015 at 10:02 AM, Peter Chen <peter.c...@freescale.com> wrote: > On Fri, Sep 25, 2015 at 09:27:49AM +0100, Felipe Tonello wrote: >> On Thu, Sep 24, 2015 at 2:20 AM, Peter Chen <peter.c...@freescale.com> wrote: >> > On Wed, Sep 23, 2015 at 12:40:46

Re: MIDI gadget allocating too much from coherent pool

2015-09-23 Thread Felipe Tonello
On Wed, Sep 23, 2015 at 12:39 PM, Felipe Tonello <e...@felipetonello.com> wrote: > Hi Peter, > > On Wed, Sep 23, 2015 at 4:09 AM, Peter Chen <peter.c...@freescale.com> wrote: >> On Tue, Sep 22, 2015 at 07:51:34PM +0100, Felipe Tonello wrote: >>> Hi all, >

Re: [PATCH 2/3] usb: gadget: f_midi: free usb request when done

2015-09-23 Thread Felipe Tonello
Hi Peter, On Wed, Sep 23, 2015 at 4:10 AM, Peter Chen wrote: > On Tue, Sep 22, 2015 at 07:59:09PM +0100, Felipe F. Tonello wrote: >> req->actual == req->length means that there is no data left to enqueue, >> so free the request. >> >> Signed-off-by: Felipe F. Tonello

Re: [PATCH 3/3] usb: gadget: f_midi: free request when usb_ep_queue fails

2015-09-23 Thread Felipe Tonello
Hi Peter, On Wed, Sep 23, 2015 at 8:09 AM, Peter Chen wrote: > On Tue, Sep 22, 2015 at 07:59:10PM +0100, Felipe F. Tonello wrote: >> This fix a memory leak that will occur in this case. >> >> Signed-off-by: Felipe F. Tonello >> --- >>

Re: MIDI gadget allocating too much from coherent pool

2015-09-23 Thread Felipe Tonello
Hi Peter, On Wed, Sep 23, 2015 at 4:09 AM, Peter Chen <peter.c...@freescale.com> wrote: > On Tue, Sep 22, 2015 at 07:51:34PM +0100, Felipe Tonello wrote: >> Hi all, >> >> On Tue, Sep 22, 2015 at 10:13 AM, Felipe Tonello <e...@felipetonello.com> >> wrote:

Re: [PATCH 2/3] usb: gadget: f_midi: free usb request when done

2015-09-23 Thread Felipe Tonello
Hi Alan, On Wed, Sep 23, 2015 at 3:30 PM, Alan Stern <st...@rowland.harvard.edu> wrote: > On Wed, 23 Sep 2015, Felipe Tonello wrote: > >> Hi Peter, >> >> On Wed, Sep 23, 2015 at 4:10 AM, Peter Chen <peter.c...@freescale.com> wrote: >> > On Tue, Sep 22

Re: MIDI gadget allocating too much from coherent pool

2015-09-22 Thread Felipe Tonello
Hi all, On Tue, Sep 22, 2015 at 10:13 AM, Felipe Tonello <e...@felipetonello.com> wrote: > Hi Peter, > > On Tue, Sep 22, 2015 at 8:03 AM, Peter Chen <peter.c...@freescale.com> wrote: >> On Tue, Sep 22, 2015 at 09:07:23AM +0100, Felipe Tonello wrote: >>> On

Re: MIDI gadget allocating too much from coherent pool

2015-09-22 Thread Felipe Tonello
Hi Peter, On Tue, Sep 22, 2015 at 8:03 AM, Peter Chen <peter.c...@freescale.com> wrote: > On Tue, Sep 22, 2015 at 09:07:23AM +0100, Felipe Tonello wrote: >> On Tue, Sep 22, 2015 at 12:41 AM, Peter Chen <peter.c...@freescale.com> >> wrote: >> > On Mon, Sep

Re: MIDI gadget allocating too much from coherent pool

2015-09-22 Thread Felipe Tonello
On Tue, Sep 22, 2015 at 12:41 AM, Peter Chen <peter.c...@freescale.com> wrote: > On Mon, Sep 21, 2015 at 03:25:28PM +0100, Felipe Tonello wrote: >> Hi all, >> >> I actually found the problem but can't really understand. The ci_irq() >> handler (from core.c) is

Re: [PATCH 2/2] usb: gadget: f_midi: check for error on usb_ep_queue

2015-09-21 Thread Felipe Tonello
Hi Chen, On Mon, Sep 21, 2015 at 7:30 AM, Peter Chen wrote: > On Fri, Sep 18, 2015 at 06:12:41PM +0100, e...@felipetonello.com wrote: >> From: "Felipe F. Tonello" >> >> f_midi is not checking weather the is an error on usb_ep_queue > >

Re: MIDI gadget allocating too much from coherent pool

2015-09-21 Thread Felipe Tonello
Hi all, I actually found the problem but can't really understand. The ci_irq() handler (from core.c) is not been called after a ep_queue() from f_midi_transmit(). Is there any reason for that? I used mass_storage gadget, made file transfers and others, and the interrupt handler was been called

Re: [PATCH 1/2] usb: chipidea: udc: improve error handling on ep_queue

2015-09-21 Thread Felipe Tonello
Hi Peter, On Mon, Sep 21, 2015 at 7:29 AM, Peter Chen wrote: > On Fri, Sep 18, 2015 at 06:12:40PM +0100, e...@felipetonello.com wrote: >> From: "Felipe F. Tonello" >> >> _ep_queue() didn't check for errors when using add_td_to_list() >> which

Re: [PATCH 2/2] usb: gadget: f_midi: check for error on usb_ep_queue

2015-09-21 Thread Felipe Tonello
Hi Peter, On Mon, Sep 21, 2015 at 8:49 AM, Peter Chen <peter.c...@freescale.com> wrote: > On Mon, Sep 21, 2015 at 09:16:05AM +0100, Felipe Tonello wrote: >> Hi Chen, >> >> On Mon, Sep 21, 2015 at 7:30 AM, Peter Chen <peter.c...@freescale.com> wrote: >> >

Re: [PATCH 3/3] usb: gadget: f_midi: check for error on usb_ep_queue

2015-09-21 Thread Felipe Tonello
t; > Signed-off-by: Felipe F. Tonello <e...@felipetonello.com> > --- > > Changes for v2: > - Update code style. > > Changes for v3: > - Use ip_ep instead of out_ep. Fixed typo in commit message. I forgot to add v3 to the patch subject, so it queued here instead.

Re: USB client crash on Vybrid with USB gadget RNDIS connection

2015-09-18 Thread Felipe Tonello
Hi Peter, On Fri, Sep 18, 2015 at 6:39 AM, Peter Chen wrote: > On Wed, Sep 16, 2015 at 02:48:50PM +0530, maitysancha...@gmail.com wrote: >> On 15-09-16 15:54:21, Peter Chen wrote: >> > On Wed, Sep 16, 2015 at 02:18:49PM +0530, maitysancha...@gmail.com wrote: >> > >

Re: MIDI gadget allocating too much from coherent pool

2015-09-18 Thread Felipe Tonello
After some debugging, here is where I am: The crash trace is like this: (f_midi.c) -> ALSA calls f_midi_in_trigger() ->tasklet_hi_schedule(>tasklet) -> f_midi_transmit(midi, NULL) the NULL here causes the f_midi to request a usb_request allocation, also it sets req->complete (which is not

Re: MIDI gadget allocating too much from coherent pool

2015-09-18 Thread Felipe Tonello
Balbi, On Fri, Sep 18, 2015 at 5:02 PM, Felipe Balbi <ba...@ti.com> wrote: > Hi, > > On Fri, Sep 18, 2015 at 04:53:09PM +0100, Felipe Tonello wrote: >> Hi Balbi, >> >> On Fri, Sep 18, 2015 at 3:25 PM, Felipe Balbi <ba...@ti.com> wrote: >> > On Fri,

Re: MIDI gadget allocating too much from coherent pool

2015-09-18 Thread Felipe Tonello
Hi Balbi, On Fri, Sep 18, 2015 at 3:25 PM, Felipe Balbi <ba...@ti.com> wrote: > On Fri, Sep 18, 2015 at 11:03:26AM +0100, Felipe Tonello wrote: >> After some debugging, here is where I am: >> >> The crash trace is like this: >> >> (f_mid

Re: [PATCH 1/2] usb: chipidea: udc: improve error handling on ep_queue

2015-09-18 Thread Felipe Tonello
Hi Felipe, On Fri, Sep 18, 2015 at 6:17 PM, Felipe Balbi wrote: > Hi, > > On Fri, Sep 18, 2015 at 06:12:40PM +0100, e...@felipetonello.com wrote: >> From: "Felipe F. Tonello" >> >> _ep_queue() didn't check for errors when using add_td_to_list() >> which can

Re: [PATCH 3/3] usb: gadget: f_midi: check for error on usb_ep_queue

2015-09-18 Thread Felipe Tonello
On Fri, Sep 18, 2015 at 6:30 PM, wrote: > From: "Felipe F. Tonello" > > f_midi is not checking weather the is an error on usb_ep_queue > request, ignoring potential problems, such as memory leaks. > > Signed-off-by: Felipe F. Tonello

Re: MIDI gadget allocating too much from coherent pool

2015-09-16 Thread Felipe Tonello
Hi Estevam, On Tue, Sep 15, 2015 at 5:09 AM, Fabio Estevam <feste...@gmail.com> wrote: > On Thu, Sep 10, 2015 at 6:47 AM, Felipe Tonello <e...@felipetonello.com> > wrote: >> Hi, >> >> I have the following setup: >> >> DSP (read sensors and read

MIDI gadget allocating too much from coherent pool

2015-09-10 Thread Felipe Tonello
Hi, I have the following setup: DSP (read sensors and read/send MIDI) <- UART -> SOC (imx6) <- USB MIDI GADGET -> HOST When the throughput from the DSP is high, thus causing the throughput on the USB to be high as well, I get a Kernel Panic saying to increase the coherent_pool. I've used some