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 called, thus >> never freeing t

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 >> --- >> drivers/usb/gadget/function/f_midi.c |

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. >> >> 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 Clemens On Mon, Oct 12, 2015 at 11:16 AM, Clemens Ladisch wrote: > Felipe Tonello wrote: >> On Fri, Oct 9, 2015 at 10:23 AM, Clemens Ladisch wrote: >>> Felipe Tonello wrote: >>>> } else if (ep == midi->in_ep) { >>>> -

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 wrote: > Felipe Balbi wrote: >> Clemens Ladisch writes: >>> Felipe Tonello wrote: >>>> req->actual == req->length means that there is no data left to enqueue, >>> >>> This condi

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 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 request. >>

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: f_midi: free request when

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 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 wrote: >> > On Wed, Sep 23, 2015 at 12:40:46PM +0100, Felipe Tonello wrote: >> >> Hi Peter, >>

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 "lsusb -t" output above. >> >>

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 >> --- >> >> Changes in v2:

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 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 wrote: >> > On Tue, Sep 22, 2015 at 07:59:10PM +0100, Felipe F. Tonello wrote: >

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? > > I just tried at v4.3-rc1 (

Re: [PATCH] ARM: dts: fix usb pin control for imx-rex dts

2015-09-23 Thread Felipe Tonello
On Mon, Sep 21, 2015 at 9:17 AM, Felipe Tonello wrote: > On Wed, Sep 16, 2015 at 6:40 PM, wrote: >> From: "Felipe F. Tonello" >> >> This fixes a duplicated pin control causing this error: >> >> imx6q-pinctrl 20e.iomuxc: pin MX6Q_PAD_GPIO_1 alr

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 wrote: > On Wed, 23 Sep 2015, Felipe Tonello wrote: > >> 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: >> &

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 >> --- >> drivers/usb/gadge

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 >> --- >> drivers/usb/gadget/function/f_midi.c | 4 +++- >> 1 file cha

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

2015-09-21 Thread Felipe Tonello
gt; 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. Do you want me to re-send as v3? Felipe Tonello -- To unsubscribe from this list: send the

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 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 wrote: >> > On Fri, Sep 18, 2015 at 06:12:41PM +0100, e...@felipetonello.co

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 can fail if dma_pool_alloc fails, thus causing a kern

Re: [PATCH] ARM: dts: fix usb pin control for imx-rex dts

2015-09-21 Thread Felipe Tonello
On Wed, Sep 16, 2015 at 6:40 PM, wrote: > From: "Felipe F. Tonello" > > This fixes a duplicated pin control causing this error: > > imx6q-pinctrl 20e.iomuxc: pin MX6Q_PAD_GPIO_1 already > requested by regulators:regulator@2; cannot claim for 2184000.usb > imx6q-pinctrl 20e.iomuxc: pin-13

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 > > %s/weather/whether > %s/the/there I fixed it on v3. Did you

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 > --- > > Changes for v2: > - Update code style. > > drive

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 fail if dma_pool_alloc fails, thus cau

Re: [PATCH] char: Added support for u-blox 6 i2c gps driver

2015-01-14 Thread Felipe Tonello
Hi Alan, On Wed, Jan 14, 2015 at 7:48 AM, One Thousand Gnomes wrote: > On Tue, 13 Jan 2015 17:16:42 -0800 > "Felipe F. Tonello" wrote: > >> This driver will basically translate serial communication to i2c >> communication >> between the user-space and the GPS module. >> >> It creates a /dev/tty

Re: [PATCH] char: Added support for u-blox 6 i2c gps driver

2015-01-13 Thread Felipe Tonello
Hi Greg, On Tue, Jan 13, 2015 at 5:33 PM, Greg Kroah-Hartman wrote: > On Tue, Jan 13, 2015 at 05:16:42PM -0800, Felipe F. Tonello wrote: >> This driver will basically translate serial communication to i2c >> communication >> between the user-space and the GPS module. >> >> It creates a /dev/ttyS

Re: [PATCH v3 1/2] ALSA: Added jack detection KControl support

2013-08-12 Thread Felipe Tonello
Hi Takashi, On Mon, Aug 12, 2013 at 3:39 AM, Takashi Iwai wrote: > At Fri, 9 Aug 2013 10:36:04 -0700, > Felipe Tonello wrote: >> >> Hi Takashi, >> >> On Fri, Aug 9, 2013 at 6:52 AM, Takashi Iwai wrote: >> > At Thu, 8 Aug 2013 23:21:55 -0700, >>

Re: [PATCH v3 1/2] ALSA: Added jack detection KControl support

2013-08-09 Thread Felipe Tonello
/* Update ALSA KControl interface */ >> + snd_kctl_jack_report((struct snd_card >> *)jack->kctl[i]->private_data, >> + jack->kctl[i], status & testbit); > > Better to do a NULL check. > In th

Re: [PATCH v2 1/2] ALSA: Added jack detection KControl support

2013-08-07 Thread Felipe Tonello
controls here. I don't > have a great problem with doing things this way but it's surprising and > I worry about confusing existing userspace, Takashi? Yes, it makes more sense. I got confused with another talk we had previously, that's why I end up doing as an int. I will wait for

Re: [PATCH 1/4] ALSA: Added jack detection kcontrol support

2013-07-26 Thread Felipe Tonello
Mark, On Fri, Jul 26, 2013 at 3:48 PM, Mark Brown wrote: > On Fri, Jul 26, 2013 at 12:10:27PM -0700, Felipe Tonello wrote: >> On Fri, Jul 26, 2013 at 11:54 AM, Mark Brown wrote: > >> > This isn't ideal for multi-function jacks like headsets - it will report >>

Re: [PATCH 4/4] ALSA: oxygen: Updating jack implementation according new ALSA Jacks

2013-07-26 Thread Felipe Tonello
Mark, On Fri, Jul 26, 2013 at 3:45 PM, Mark Brown wrote: > On Fri, Jul 26, 2013 at 12:02:51PM -0700, Felipe Tonello wrote: >> On Fri, Jul 26, 2013 at 11:56 AM, Mark Brown wrote: > >> >> snd_jack_new(chip->card, "Headphone", >> >> -

Re: [PATCH 3/4] ALSA: SoC: Updating jack implementation according new ALSA Jacks

2013-07-26 Thread Felipe Tonello
On Fri, Jul 26, 2013 at 11:50 AM, Mark Brown wrote: > On Fri, Jul 26, 2013 at 11:25:32AM -0700, Felipe F. Tonello wrote: >> From: "Felipe F. Tonello" >> >> ALSA standard jacks already are implemented using ALSA KControl. >> So there is no need implement that itself or to use snd_jack for input >>

Re: [PATCH 1/4] ALSA: Added jack detection kcontrol support

2013-07-26 Thread Felipe Tonello
PulseAudio does that way. > > What I'd expect to happen here is that for multi function jacks we > create a control per function if the controls are valid. Do you mean based on snd_jack_types? Felipe Tonello -- To unsubscribe from this list: send the line "unsubscribe linux-kern

Re: [PATCH 1/4] ALSA: Added jack detection kcontrol support

2013-07-26 Thread Felipe Tonello
ues that can be detected by >> * this jack >> + * @idx: index of this control item >> * @jjack: Used to provide the allocated jack object to the caller. > > "The index of the ALSA control created to represent the jack. Ok. Felipe Tonello -- To unsubscribe fr

Re: [PATCH 4/4] ALSA: oxygen: Updating jack implementation according new ALSA Jacks

2013-07-26 Thread Felipe Tonello
SND_JACK_HEADPHONE, 0, &data->hp_jack); >> xonar_ds_handle_hp_jack(chip); > > ...this really ought to be done as part of the commit that adds the > parameter since it breaks the build until this patch is applied. But that's why is a patch series. But as

Re: [PATCH] ALSA: SoC: Added jack detection kcontrol support

2013-07-23 Thread Felipe Tonello
Hi Mark, On Tue, Jul 23, 2013 at 5:40 AM, Mark Brown wrote: > On Mon, Jul 22, 2013 at 02:11:44PM -0700, Felipe Tonello wrote: > >> My question is: Why ALSA Jack support uses evdev input events to >> notify user-space? Is there any user-space relying on that? If no, I >> w

Re: [PATCH] ALSA: SoC: Added jack detection kcontrol support

2013-07-22 Thread Felipe Tonello
nd remove specific implementations. At least the only daemon that I know that supports jack detection, which is PulseAudio, uses this new ALSA KControl for Jacks. Regards, Felipe Tonello -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message

Re: [PATCH 1/2] mmc: sdhci: Added set_power sdhci_ops handler.

2013-05-24 Thread Felipe Tonello
Hi all, On Thu, May 23, 2013 at 9:02 PM, Jaehoon Chung wrote: > On 05/23/2013 04:25 PM, Guennadi Liakhovetski wrote: >> On Wed, 22 May 2013, Felipe Ferreri Tonello wrote: >> >>> Hi Guennadi, >>> >>> On Wednesday, May 22, 2013 10:30:40 PM Guennadi Liakhovetski wrote: On Wed, 22 May 2013, Feli