Re: [PATCHv5 4/7] arm: omap3: twl: remove usb phy init data

2014-11-20 Thread Kishon Vijay Abraham I
Hi Tony, On Wednesday 19 November 2014 08:58 PM, Heikki Krogerus wrote: > The driver does no use it any more. > > Signed-off-by: Heikki Krogerus This version is slightly different from the one you gave your Acked-by. So are you okay if I merge this with your Acked-by? Thanks Kishon > --- > a

Re: [PATCHv5 6/7] base: platform: name the device already during allocation

2014-11-20 Thread Kishon Vijay Abraham I
Hi Greg, On Wednesday 19 November 2014 08:58 PM, Heikki Krogerus wrote: > The device name is usually required when assigning resources > like clocks to platform devices. The problem is that the > device name is not know before platform_device_add is called > and that can be too late as the drivers

Re: [PATCHv5 0/7] phy: simplified phy lookup

2014-11-20 Thread Vivek Gautam
Hi, On Wed, Nov 19, 2014 at 8:58 PM, Heikki Krogerus wrote: > This set will in practice just separate the creation of a phy and > binding of it to the consumer. Mapping phys to consumers can be now > done with lookups similarly how clocks can be mapped in clkdev.c. > > Vivek needs to handle the

Re: Possible memory leak in acm_probe not freeing (acm->country_codes) on error path

2014-11-20 Thread Oliver Neukum
On Wed, 2014-11-19 at 19:22 -0600, Ahmed Tamrawi wrote: > Bug Report Filed: https://bugzilla.kernel.org/show_bug.cgi?id=88521 > Linux Version [3.17-rc1] > Configuration: Default configuration for x86 > > Function Source: > http://lxr.free-electrons.com/source/drivers/usb/class/cdc-acm.c#L1404 > >

Re: Possible memory leak in acm_probe not freeing (acm->country_codes) on error path

2014-11-20 Thread Johan Hovold
On Thu, Nov 20, 2014 at 01:45:05PM +0100, Oliver Neukum wrote: > On Wed, 2014-11-19 at 19:22 -0600, Ahmed Tamrawi wrote: > > Bug Report Filed: https://bugzilla.kernel.org/show_bug.cgi?id=88521 > > Linux Version [3.17-rc1] > > Configuration: Default configuration for x86 > > > > Function Source: >

Re: Possible memory leak in acm_probe not freeing (acm->country_codes) on error path

2014-11-20 Thread Oliver Neukum
On Thu, 2014-11-20 at 14:27 +0100, Johan Hovold wrote: > It looks like it's never freed in the alloc_fail8 error path of probe, > though. Indeed. A case of the coder being blind to his own code. Patch is forthcoming. Thanks Oliver -- To unsubscribe from this list: send

[PATCH] cdc-acm: memory leak in error case

2014-11-20 Thread Oliver Neukum
If probe() fails not only the attributes need to be removed but also the memory freed. Reported-by: Ahmed Tamrawi Signed-off-by: Oliver Neukum CC: sta...@vger.kernel.org --- drivers/usb/class/cdc-acm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb

Re: Possible memory leak in acm_probe not freeing (acm->country_codes) on error path

2014-11-20 Thread Bjørn Mork
Oliver Neukum writes: > On Thu, 2014-11-20 at 14:27 +0100, Johan Hovold wrote: > >> It looks like it's never freed in the alloc_fail8 error path of probe, >> though. > > Indeed. A case of the coder being blind to his own code. > Patch is forthcoming. Why does the driver have to allocate anything

Re: Possible memory leak in acm_probe not freeing (acm->country_codes) on error path

2014-11-20 Thread Oliver Neukum
On Thu, 2014-11-20 at 15:09 +0100, Bjørn Mork wrote: > Oliver Neukum writes: > > On Thu, 2014-11-20 at 14:27 +0100, Johan Hovold wrote: > > > >> It looks like it's never freed in the alloc_fail8 error path of probe, > >> though. > > > > Indeed. A case of the coder being blind to his own code. > >

Re: Possible memory leak in acm_probe not freeing (acm->country_codes) on error path

2014-11-20 Thread Bjørn Mork
Oliver Neukum writes: > On Thu, 2014-11-20 at 15:09 +0100, Bjørn Mork wrote: >> Oliver Neukum writes: >> > On Thu, 2014-11-20 at 14:27 +0100, Johan Hovold wrote: >> > >> >> It looks like it's never freed in the alloc_fail8 error path of probe, >> >> though. >> > >> > Indeed. A case of the coder b

Re: Possible memory leak in acm_probe not freeing (acm->country_codes) on error path

2014-11-20 Thread Oliver Neukum
On Thu, 2014-11-20 at 15:36 +0100, Bjørn Mork wrote: > Oliver Neukum writes: > > On Thu, 2014-11-20 at 15:09 +0100, Bjørn Mork wrote: > >> Oliver Neukum writes: > >> > On Thu, 2014-11-20 at 14:27 +0100, Johan Hovold wrote: > >> > > >> >> It looks like it's never freed in the alloc_fail8 error pat

Re: Possible memory leak in acm_probe not freeing (acm->country_codes) on error path

2014-11-20 Thread Alan Stern
On Thu, 20 Nov 2014, Oliver Neukum wrote: > On Thu, 2014-11-20 at 15:36 +0100, Bjørn Mork wrote: > > Oliver Neukum writes: > > > On Thu, 2014-11-20 at 15:09 +0100, Bjørn Mork wrote: > > >> Oliver Neukum writes: > > >> > On Thu, 2014-11-20 at 14:27 +0100, Johan Hovold wrote: > > >> > > > >> >> It

Re: [PATCH] usb: ehci-orion: enable big-endian support

2014-11-20 Thread Alan Stern
On Wed, 19 Nov 2014, Thomas Petazzoni wrote: > Dear Marcin Wojtas, > > On Thu, 13 Nov 2014 00:49:50 +0100, Marcin Wojtas wrote: > > This commit fixes ehci-orion operation in big-endian mode by enabling > > byteswap > > when accessing registers using 'rdl' and 'wrl' macros. > > > > Signed-off-by

[PATCH 1/1] net: USB: Deletion of unnecessary checks before the function call "kfree"

2014-11-20 Thread SF Markus Elfring
From: Markus Elfring Date: Thu, 20 Nov 2014 16:11:56 +0100 The kfree() function tests whether its argument is NULL and then returns immediately. Thus the test around the call is not needed. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring --- drivers/net

[PATCH] usb:phy: propagate __of_usb_find_phy()'s error on failure

2014-11-20 Thread Arjun Sreedharan
When __of_usb_find_phy() fails, it returns -ENODEV - its error code has to be returned by devm_usb_get_phy_by_phandle(). Only when the former function succeeds and try_module_get() fails should -EPROBE_DEFER be returned. Signed-off-by: Arjun Sreedharan --- drivers/usb/phy/phy.c | 4 +++- 1 file

Re: [PATCH RESEND v2] usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC

2014-11-20 Thread Ashwini Pahuja
On Thu, Nov 13, 2014 at 12:12 PM, Felipe Balbi wrote: > Hi, > > (please don't top-post) > > On Thu, Nov 13, 2014 at 11:26:50AM -0700, Ashwini Pahuja wrote: >> Hi Felipe, >> >> I Just sent you the V3 PATCH, I think it should be good for your next >> submission to Greg for 3.18-rc6, I guess it's too

[PATCH] usb: dwc3: trace: don't save pointers

2014-11-20 Thread Felipe Balbi
There was another instance where we were holding pointers which could be long gone. Fix that by caching only values pointed to by such pointer. Because no crash has been observed, this patch will be sent on v3.19 merge window, instead of -rc. Signed-off-by: Felipe Balbi --- drivers/usb/dwc3/tr

[PATCH 6/7] host: ehci-w90x900: fix error return code

2014-11-20 Thread Julia Lawall
From: Julia Lawall Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret =

[PATCH 0/7] fix error return code

2014-11-20 Thread Julia Lawall
The complate semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @ok exists@ identifier f,ret,i; expression e; constant c; @@ // identify a function that returns a negative return value at least once. f(...) { ... when any ( return -c@i; | ret = -c@i; ... when !

[PATCH 3/7] dwc3: dwc3-keystone: fix error return code

2014-11-20 Thread Julia Lawall
From: Julia Lawall Return a negative error code on failure. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier ret; expression e1,e2; @@ ( if (\(ret < 0\|ret != 0\)) { ... return ret; } | ret = 0 ) ... when != ret =

Re: [PATCH RESEND v2] usb: gadget: Add UDC driver for Broadcom USB3.0 device controller IP BDC

2014-11-20 Thread Felipe Balbi
On Thu, Nov 20, 2014 at 09:12:56AM -0700, Ashwini Pahuja wrote: > On Thu, Nov 13, 2014 at 12:12 PM, Felipe Balbi wrote: > > Hi, > > > > (please don't top-post) > > > > On Thu, Nov 13, 2014 at 11:26:50AM -0700, Ashwini Pahuja wrote: > >> Hi Felipe, > >> > >> I Just sent you the V3 PATCH, I think it

Re: [PATCH] usb:phy: propagate __of_usb_find_phy()'s error on failure

2014-11-20 Thread Felipe Balbi
On Thu, Nov 20, 2014 at 09:23:36PM +0530, Arjun Sreedharan wrote: > When __of_usb_find_phy() fails, it returns -ENODEV - its > error code has to be returned by devm_usb_get_phy_by_phandle(). > Only when the former function succeeds and try_module_get() > fails should -EPROBE_DEFER be returned. > >

Re: [PATCH] usb: gadget: add USB3 support to the printer driver

2014-11-20 Thread Felipe Balbi
On Tue, Nov 18, 2014 at 03:11:54PM -0500, Jorge Ramirez-Ortiz wrote: > Add SS descriptors to support the capabilities provided by USB3 controller > drivers; unit tests run using a PLX 3380 [max transfer speed measured of > 1Gbps] > > This driver shall fallback to lower operating modes when the hi

Re: [PATCH] usb: gagdet: f_midi: fix parameter assignment

2014-11-20 Thread Felipe Balbi
On Tue, Nov 18, 2014 at 11:21:17PM +0100, Daniel Mack wrote: > f_midi_register_card() uses midi->id and midi->index, so they need to > be assigned before the function is called from f_midi_bind_config(). > Move the assigment of midi->buflen and midi->qlen as well so they are > all grouped. > > Com

Re: [RESEND PATCH] usb: gadget: at91_udc: move prepare clk into process context

2014-11-20 Thread Felipe Balbi
On Wed, Nov 19, 2014 at 04:37:27PM +0100, Nicolas Ferre wrote: > From: Ronald Wahl > > Commit 7628083227b6bc4a7e33d7c381d7a4e558424b6b (usb: gadget: at91_udc: > prepare clk before calling enable) added clock preparation in interrupt > context. This is not allowed as it might sleep. Also setting t

Re: [PATCH v3 1/2] usb: dwc2/gadget: add mutex to serialize init/deinit calls

2014-11-20 Thread Felipe Balbi
On Fri, Oct 31, 2014 at 11:12:33AM +0100, Marek Szyprowski wrote: > This patch adds mutex, which protects initialization and > deinitialization procedures against suspend/resume methods. > > Signed-off-by: Marek Szyprowski doesn't apply either: checking file drivers/usb/dwc2/core.h Hunk #1 FAIL

Re: [PATCH v5] usb: dwc2/gadget: rework disconnect event handling

2014-11-20 Thread Felipe Balbi
On Mon, Nov 17, 2014 at 09:59:42AM +0100, Marek Szyprowski wrote: > This patch adds a call to s3c_hsotg_disconnect() from 'end session' > interrupt (GOTGINT_SES_END_DET) to correctly notify gadget subsystem > about unplugged usb cable. DISCONNINT interrupt cannot be used for this > purpose, because

Re: [PATCH 1/3] usb: phy: introduce usb_phy_set_event interface

2014-11-20 Thread Felipe Balbi
On Wed, Nov 19, 2014 at 08:36:22AM -0800, Todd Poynor wrote: > On Wed, Nov 19, 2014 at 2:43 AM, Kiran Kumar Raparthy > wrote: > > From: Todd Poynor > > > > usb: phy: introduce usb_phy_set_event interface > > Hi Kiran, this is new stuff that is all your own work and you deserve > the credit. > >

Windows Host support for UAC1 (USB Audio Class version 1)

2014-11-20 Thread Xuebing Wang
Hi community, As Windows support UAC1 only, I'd presume that anyone who is serious about UAC will consider Windows Host support. A few months back, I got UAC1 working for Windows 7/8 Host on my Wandboard (Freescale i.MX6 based), on kernel 3.10.17. I quickly checked the latest Linux kernel,

Re: [PATCH 1/3] usb: phy: introduce usb_phy_set_event interface

2014-11-20 Thread Kiran Raparthy
Hi Felipe, On 21 November 2014 01:24, Felipe Balbi wrote: > On Wed, Nov 19, 2014 at 08:36:22AM -0800, Todd Poynor wrote: >> On Wed, Nov 19, 2014 at 2:43 AM, Kiran Kumar Raparthy >> wrote: >> > From: Todd Poynor >> > >> > usb: phy: introduce usb_phy_set_event interface >> >> Hi Kiran, this is new

Re: [PATCH] usb: gagdet: f_midi: fix parameter assignment

2014-11-20 Thread Daniel Mack
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 11/20/2014 08:49 PM, Felipe Balbi wrote: > On Tue, Nov 18, 2014 at 11:21:17PM +0100, Daniel Mack wrote: >> f_midi_register_card() uses midi->id and midi->index, so they >> need to be assigned before the function is called from >> f_midi_bind_config(

Re: [PATCHv7 1/8] usb: dwc2: Update the gadget driver to use common dwc2_hsotg structure

2014-11-20 Thread Roy
Hi Dinh: On 2014/11/12 1:13, dingu...@opensource.altera.com wrote: > From: Dinh Nguyen > > Adds the gadget data structure and appropriate data structure pointers > to the common dwc2_hsotg data structure. To keep the driver data > dereference code looking clean, the gadget variable declares are o

RE: Windows Host support for UAC1 (USB Audio Class version 1)

2014-11-20 Thread Peter Chen
> > Hi community, > > As Windows support UAC1 only, I'd presume that anyone who is serious about > UAC will consider Windows Host support. > > A few months back, I got UAC1 working for Windows 7/8 Host on my > Wandboard (Freescale i.MX6 based), on kernel 3.10.17. > > I quickly checked the lat

[PATCH v1 2/3] usb: phy: Handle per-PHY event for connect and disconnect events

2014-11-20 Thread Kiran Raparthy
usb: phy: Handle per-PHY event for connnect and disconnect events When usb is connected and enumerated in device mode or when usb is disconnected,call usb_phy_set_event from phy drivers to handle per-PHY event. Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-ker...@vger.kernel.org Cc: linux-u

[PATCH v1 1/3] usb: phy: introduce usb_phy_set_event interface

2014-11-20 Thread Kiran Raparthy
usb: phy: introduce usb_phy_set_event interface PHY drivers require a generic interface to handle per-PHY events. usb_phy_set_event interface sets event to phy event. PHY drivers call this interface for each phy event. Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-ker...@vger.kernel.org Cc

[PATCH v1 3/3] usb: phy: hold wakeupsource when USB is enumerated in peripheral mode

2014-11-20 Thread Kiran Raparthy
usb: phy: hold wakeupsource when USB is enumerated in peripheral mode Some systems require a mechanism to prevent system to enter into suspend state when USB is connected and enumerated in peripheral mode. This patch provides an interface to hold a wakeupsource to prevent suspend. PHY drivers can