[PATCH] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Chao Xie
Some controller need software to initialize PHY before add host controller, and shut down PHY after remove host controller. Add the generic code for these controllers so they do not need do it in its own host controller driver. Signed-off-by: Chao Xie chao@marvell.com ---

Re: [PATCH] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 03:15:01AM -0400, Chao Xie wrote: Some controller need software to initialize PHY before add host controller, and shut down PHY after remove host controller. Add the generic code for these controllers so they do not need do it in its own host controller driver.

Re: [PATCH] build some drivers only when compile-testing

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 06:51:32AM +0200, Michal Marek wrote: Dne 17.6.2013 22:05, Jiri Slaby napsal(a): On 05/23/2013 05:09 AM, Jeff Mahoney wrote: On 5/22/13 10:23 PM, Greg Kroah-Hartman wrote: On Wed, May 22, 2013 at 11:18:46AM +0200, Jiri Slaby wrote: Some drivers can be built on

Re: [PATCH v2 3/5] USB: OMAP1: OTG controller driver

2013-06-18 Thread Felipe Balbi
On Sun, Jun 16, 2013 at 04:35:10PM +0300, Aaro Koskinen wrote: Transceivers need to manage OTG controller state on OMAP1 to enable switching between peripheral and host modes. Provide a driver for that. Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi --- drivers/usb/phy/Kconfig|

Re: [PATCH] build some drivers only when compile-testing

2013-06-18 Thread Jiri Slaby
On 06/18/2013 10:18 AM, Felipe Balbi wrote: Hi, On Tue, Jun 18, 2013 at 06:51:32AM +0200, Michal Marek wrote: Dne 17.6.2013 22:05, Jiri Slaby napsal(a): On 05/23/2013 05:09 AM, Jeff Mahoney wrote: On 5/22/13 10:23 PM, Greg Kroah-Hartman wrote: On Wed, May 22, 2013 at 11:18:46AM +0200, Jiri

Re: [PATCH] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Felipe Balbi
HI, On Tue, Jun 18, 2013 at 11:23:59AM +0300, Roger Quadros wrote: On 06/18/2013 11:01 AM, Felipe Balbi wrote: Hi, On Tue, Jun 18, 2013 at 03:15:01AM -0400, Chao Xie wrote: Some controller need software to initialize PHY before add host controller, and shut down PHY after remove host

Re: [PATCH] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Roger Quadros
On 06/18/2013 11:01 AM, Felipe Balbi wrote: Hi, On Tue, Jun 18, 2013 at 03:15:01AM -0400, Chao Xie wrote: Some controller need software to initialize PHY before add host controller, and shut down PHY after remove host controller. Add the generic code for these controllers so they do not

Re: [PATCH 1/2] musb: musb: dsps: support multiple instances

2013-06-18 Thread Felipe Balbi
On Mon, Jun 17, 2013 at 05:13:33PM +0200, Sebastian Andrzej Siewior wrote: If we specify right now more than once instance then we attempt to add the platform device twice. The nop driver does not mind the second add because it checks for it and returns without a word. At removal time a

Re: [PATCH 2/2] musb: musb: dsps: determine the number of instances at runtime

2013-06-18 Thread Felipe Balbi
Hi, On Mon, Jun 17, 2013 at 05:13:34PM +0200, Sebastian Andrzej Siewior wrote: There is no need to hardcode the number of instances here. It is better to determine them at runtime. Even if the device provides two instances one might only want to use one of them. Signed-off-by: Sebastian

Re: [PATCH 1/2] musb: musb: dsps: support multiple instances

2013-06-18 Thread Sebastian Andrzej Siewior
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 06/18/2013 10:27 AM, Felipe Balbi wrote: diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index e1b661d..d9ff390 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -415,9 +415,14 @@ static

Re: [PATCH] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Roger Quadros
On 06/18/2013 11:24 AM, Felipe Balbi wrote: HI, On Tue, Jun 18, 2013 at 11:23:59AM +0300, Roger Quadros wrote: On 06/18/2013 11:01 AM, Felipe Balbi wrote: Hi, On Tue, Jun 18, 2013 at 03:15:01AM -0400, Chao Xie wrote: Some controller need software to initialize PHY before add host

Re: [PATCH] build some drivers only when compile-testing

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 10:24:40AM +0200, Jiri Slaby wrote: Sam Ravnborg (the kconfig ex-maintainer) once wrote that he doesn't want to extend the kconfig language for this purpose (which I support). That a config option is fine and sufficient in this case [1]. Except he called the

Re: [PATCH] build some drivers only when compile-testing

2013-06-18 Thread Tomi Valkeinen
On 18/06/13 07:51, Michal Marek wrote: Sam Ravnborg (the kconfig ex-maintainer) once wrote that he doesn't want to extend the kconfig language for this purpose (which I support). That a config option is fine and sufficient in this case [1]. Except he called the config option SHOW_ALL_DRIVERS.

Re: [PATCH] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 11:34:08AM +0300, Roger Quadros wrote: On Tue, Jun 18, 2013 at 03:15:01AM -0400, Chao Xie wrote: Some controller need software to initialize PHY before add host controller, and shut down PHY after remove host controller. Add the generic code for these

Re: [PATCH 1/2] musb: musb: dsps: support multiple instances

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 10:34:41AM +0200, Sebastian Andrzej Siewior wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 06/18/2013 10:27 AM, Felipe Balbi wrote: diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index e1b661d..d9ff390 100644 ---

Re: [PATCH 2/2] musb: musb: dsps: determine the number of instances at runtime

2013-06-18 Thread Sebastian Andrzej Siewior
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 06/18/2013 10:31 AM, Felipe Balbi wrote: Hi, Hi Felipe, --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -110,8 +110,6 @@ struct dsps_musb_wrapper { @@ -646,6 +645,23 @@ static int dsps_probe(struct platform_device

Re: [PATCH] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Roger Quadros
On 06/18/2013 11:37 AM, Felipe Balbi wrote: Hi, On Tue, Jun 18, 2013 at 11:34:08AM +0300, Roger Quadros wrote: On Tue, Jun 18, 2013 at 03:15:01AM -0400, Chao Xie wrote: Some controller need software to initialize PHY before add host controller, and shut down PHY after remove host

Re: [PATCH] build some drivers only when compile-testing

2013-06-18 Thread Michal Marek
Dne 18.6.2013 10:34, Felipe Balbi napsal(a): Hi, On Tue, Jun 18, 2013 at 10:24:40AM +0200, Jiri Slaby wrote: Sam Ravnborg (the kconfig ex-maintainer) once wrote that he doesn't want to extend the kconfig language for this purpose (which I support). That a config option is fine and

Re: [PATCH] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 11:45:05AM +0300, Roger Quadros wrote: this looks wrong for two reasons: a) you're not grabbing the PHY here. You can't just assume another entity grabbed your PHY for you. Isn't that done in the controller drivers e.g. ehci-fsl.c, ohci-omap,

Re: [PATCH] build some drivers only when compile-testing

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 10:44:52AM +0200, Michal Marek wrote: On Tue, Jun 18, 2013 at 10:24:40AM +0200, Jiri Slaby wrote: Sam Ravnborg (the kconfig ex-maintainer) once wrote that he doesn't want to extend the kconfig language for this purpose (which I support). That a config option is

Re: [PATCH 2/2] musb: musb: dsps: determine the number of instances at runtime

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 10:43:55AM +0200, Sebastian Andrzej Siewior wrote: --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -110,8 +110,6 @@ struct dsps_musb_wrapper { @@ -646,6 +645,23 @@ static int dsps_probe(struct platform_device *pdev) }

Re: [PATCH] build some drivers only when compile-testing

2013-06-18 Thread Jiri Slaby
On 06/18/2013 10:51 AM, Felipe Balbi wrote: right, but my argument is that I rather not have either. Depend on PCI if you us PCI, depend on EXTCON if you use extcon, but no driver should have an ARCH dependency. Specially since it lets people include mach/* and asm/* headers because it doesn't

Re: [PATCH 2/2] musb: musb: dsps: determine the number of instances at runtime

2013-06-18 Thread Sebastian Andrzej Siewior
On 06/18/2013 10:54 AM, Felipe Balbi wrote: Hi, Hi Felipe, This isn't exactly a child node, is it? There is of_get_child_count() but this isn't a child, it is one property. is it because we haven't added DTS support for musb core ? Eventually we can/should add and convert this to

Re: [PATCH] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Chao Xie
On Tue, Jun 18, 2013 at 4:48 PM, Felipe Balbi ba...@ti.com wrote: Hi, On Tue, Jun 18, 2013 at 11:45:05AM +0300, Roger Quadros wrote: this looks wrong for two reasons: a) you're not grabbing the PHY here. You can't just assume another entity grabbed your PHY for you. Isn't

Re: [PATCH v7 1/9] drivers: phy: add generic PHY framework

2013-06-18 Thread Felipe Balbi
Hi, On Thu, Jun 13, 2013 at 02:13:51PM +0530, Kishon Vijay Abraham I wrote: +struct phy_provider *of_phy_provider_register(struct device *dev, + struct module *owner, struct phy * (*of_xlate)(struct device *dev, + struct of_phandle_args *args)) I would rename this to

Re: [PATCH v7 2/9] usb: phy: omap-usb2: use the new generic PHY framework

2013-06-18 Thread Felipe Balbi
Hi, On Thu, Jun 13, 2013 at 02:13:52PM +0530, Kishon Vijay Abraham I wrote: @@ -159,6 +191,12 @@ static int omap_usb2_probe(struct platform_device *pdev) otg-start_srp = omap_usb_start_srp; otg-phy= phy-phy; + pm_runtime_enable(phy-dev); enabling

Re: [PATCH v7 3/9] usb: phy: twl4030: use the new generic PHY framework

2013-06-18 Thread Felipe Balbi
On Thu, Jun 13, 2013 at 02:13:53PM +0530, Kishon Vijay Abraham I wrote: Used the generic PHY framework API to create the PHY. For powering on and powering off the PHY, power_on and power_off ops are used. Once the MUSB OMAP glue is adapted to the new framework, the suspend and resume ops of

Re: [PATCH v7 4/9] usb: phy: twl4030: twl4030 shouldn't be subsys_initcall

2013-06-18 Thread Felipe Balbi
On Thu, Jun 13, 2013 at 02:13:54PM +0530, Kishon Vijay Abraham I wrote: Changed the inticall from subsys_initcall to module_init for twl4030-usb. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com not part of the series, should be sent separately. I'll queue this one for v3.12 once

Re: [PATCH v7 5/9] ARM: OMAP: USB: Add phy binding information

2013-06-18 Thread Felipe Balbi
On Thu, Jun 13, 2013 at 02:13:55PM +0530, Kishon Vijay Abraham I wrote: In order for controllers to get PHY in case of non dt boot, the phy binding information (phy device name) should be added in the platform data of the controller. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com I

Re: [PATCH v7 6/9] ARM: dts: omap: update usb_otg_hs data

2013-06-18 Thread Felipe Balbi
On Thu, Jun 13, 2013 at 02:13:56PM +0530, Kishon Vijay Abraham I wrote: Updated the usb_otg_hs dt data to include the *phy* and *phy-names* binding in order for the driver to use the new generic PHY framework. Also updated the Documentation to include the binding information. The PHY binding

Re: [PATCH v7 7/9] usb: musb: omap2430: use the new generic PHY framework

2013-06-18 Thread Felipe Balbi
Hi, On Thu, Jun 13, 2013 at 02:13:57PM +0530, Kishon Vijay Abraham I wrote: Use the generic PHY framework API to get the PHY. The usb_phy_set_resume and usb_phy_set_suspend is replaced with power_on/get_sync and power_off/put_sync to align with the new PHY framework. musb-xceiv can't be

Re: [PATCH v7 2/9] usb: phy: omap-usb2: use the new generic PHY framework

2013-06-18 Thread Kishon Vijay Abraham I
Hi, On Tuesday 18 June 2013 03:10 PM, Felipe Balbi wrote: Hi, On Thu, Jun 13, 2013 at 02:13:52PM +0530, Kishon Vijay Abraham I wrote: @@ -159,6 +191,12 @@ static int omap_usb2_probe(struct platform_device *pdev) otg-start_srp = omap_usb_start_srp; otg-phy

Re: [PATCH v7 9/9] usb: phy: twl4030-usb: remove *set_suspend* and *phy_init* ops

2013-06-18 Thread Felipe Balbi
On Thu, Jun 13, 2013 at 02:13:59PM +0530, Kishon Vijay Abraham I wrote: Now that twl4030-usb is adapted to the new generic PHY framework, *set_suspend* and *phy_init* ops can be removed from twl4030-usb driver. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Felipe Balbi

Re: [PATCH v7 8/9] usb: phy: omap-usb2: remove *set_suspend* callback from omap-usb2

2013-06-18 Thread Felipe Balbi
On Thu, Jun 13, 2013 at 02:13:58PM +0530, Kishon Vijay Abraham I wrote: Now that omap-usb2 is adapted to the new generic PHY framework, *set_suspend* ops can be removed from omap-usb2 driver. Signed-off-by: Kishon Vijay Abraham I kis...@ti.com Reviewed-by: Felipe Balbi ba...@ti.com --

Re: [PATCH v7 0/9] Generic PHY Framework

2013-06-18 Thread Felipe Balbi
Hi, On Mon, Jun 17, 2013 at 12:16:35PM +0200, Sylwester Nawrocki wrote: I have already used this API for our MIPI CSI-2/DSIM DPHYs driver, the RFC patch series can be found at [1]. Thanks, Sylwester [1] http://www.spinics.net/lists/arm-kernel/msg251666.html one comment to that series:

Re: [PATCH v7 2/9] usb: phy: omap-usb2: use the new generic PHY framework

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 03:19:03PM +0530, Kishon Vijay Abraham I wrote: Hi, On Tuesday 18 June 2013 03:10 PM, Felipe Balbi wrote: Hi, On Thu, Jun 13, 2013 at 02:13:52PM +0530, Kishon Vijay Abraham I wrote: @@ -159,6 +191,12 @@ static int omap_usb2_probe(struct platform_device

Re: [Application RFC PATCH] ptp-gadget: move from gadgetfs to functionfs

2013-06-18 Thread Guennadi Liakhovetski
Hi Michael On Mon, 17 Jun 2013, Michael Grzeschik wrote: Hi Guennadi, On Thu, Jun 06, 2013 at 12:34:39AM +0200, Michael Grzeschik wrote: This patch moves the ptp-gadget to use functionfs for the endpoint handling. With functionfs, this patch is deleting a lot of control ep0 code, which

Re: [PATCH 2/2] musb: musb: dsps: determine the number of instances at runtime

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 11:24:40AM +0200, Sebastian Andrzej Siewior wrote: On 06/18/2013 10:54 AM, Felipe Balbi wrote: Hi, Hi Felipe, This isn't exactly a child node, is it? There is of_get_child_count() but this isn't a child, it is one property. is it because we haven't

Re: [PATCH v7 2/9] usb: phy: omap-usb2: use the new generic PHY framework

2013-06-18 Thread Kishon Vijay Abraham I
Hi, On Tuesday 18 June 2013 03:20 PM, Felipe Balbi wrote: Hi, On Tue, Jun 18, 2013 at 03:19:03PM +0530, Kishon Vijay Abraham I wrote: Hi, On Tuesday 18 June 2013 03:10 PM, Felipe Balbi wrote: Hi, On Thu, Jun 13, 2013 at 02:13:52PM +0530, Kishon Vijay Abraham I wrote: @@ -159,6 +191,12 @@

RE: [PATCH -next] usb: gadget: f_ecm: fix missing unlock on error in ecm_alloc()

2013-06-18 Thread Andrzej Pietrasiewicz
On Tuesday, June 18, 2013 6:21 AM Wei Yongjun wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function ecm_alloc() in the error handling case. Introduced by commit da92801c647cdebfd45001fd6aaecb8f0be7f56b. (usb: gadget: f_ecm: add configfs

Re: [PATCH v2 1/5] ARM: OMAP1: USB: move omap_usb_config to platform data

2013-06-18 Thread Tony Lindgren
* Aaro Koskinen aaro.koski...@iki.fi [130616 06:41]: Move omap_usb_config to platform data, so that OTG driver can include it. Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi This is probably best queued with the USB transceiver: Acked-by: Tony Lindgren t...@atomide.com ---

RE: [PATCH -next] usb: gadget: f_ncm: fix missing unlock on error in ncm_alloc()

2013-06-18 Thread Andrzej Pietrasiewicz
On Tuesday, June 18, 2013 5:43 AM Wei Yongjun wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function ncm_alloc() in the error handling case. Introduced by commit e730660378be92b83288b59b824ccdace5cd2652. (usb: gadget: f_ncm: add configfs

RE: [PATCH -next] usb: gadget: f_subset: fix missing unlock on error in geth_alloc()

2013-06-18 Thread Andrzej Pietrasiewicz
On Tuesday, June 18, 2013 5:41 AM Wei Yongjun wrote: From: Wei Yongjun yongjun_...@trendmicro.com.cn Add the missing unlock before return from function geth_alloc() in the error handling case. Introduced by commit 02832e56f88a981474ee4c7c141f46fc1b4454f4. (usb: gadget: f_subset: add

Re: [PATCH V2 05/10] USB: OHCI: Properly handle ohci-exynos suspend

2013-06-18 Thread Sachin Kamat
On 18 June 2013 15:24, Manjunath Goudar manjunath.gou...@linaro.org wrote: On 14 June 2013 01:22, Alan Stern st...@rowland.harvard.edu wrote: On Thu, 13 Jun 2013, Tomasz Figa wrote: + rc = ohci_suspend(hcd, do_wakeup); + if (rc == 0 do_wakeup HCD_WAKEUP_PENDING(hcd)) { +

Re: [PATCH v7 2/9] usb: phy: omap-usb2: use the new generic PHY framework

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 03:26:23PM +0530, Kishon Vijay Abraham I wrote: On Thu, Jun 13, 2013 at 02:13:52PM +0530, Kishon Vijay Abraham I wrote: @@ -159,6 +191,12 @@ static int omap_usb2_probe(struct platform_device *pdev) otg-start_srp = omap_usb_start_srp;

Re: [PATCH v7 5/9] ARM: OMAP: USB: Add phy binding information

2013-06-18 Thread Kishon Vijay Abraham I
Hi, On Tuesday 18 June 2013 03:14 PM, Felipe Balbi wrote: On Thu, Jun 13, 2013 at 02:13:55PM +0530, Kishon Vijay Abraham I wrote: In order for controllers to get PHY in case of non dt boot, the phy binding information (phy device name) should be added in the platform data of the controller.

Re: [PATCH v2 5/5] ARM: OMAP1: nokia770: enable Tahvo

2013-06-18 Thread Tony Lindgren
* Aaro Koskinen aaro.koski...@iki.fi [130616 06:41]: Add platform data for Tahvo. Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi Thanks, applying into omap-for-v3.11/board. I left out the .extcon entry to remove the dependency to the USB patches. Then the rest of the series can be queued

Re: [PATCH v7 5/9] ARM: OMAP: USB: Add phy binding information

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 03:34:36PM +0530, Kishon Vijay Abraham I wrote: On Tuesday 18 June 2013 03:14 PM, Felipe Balbi wrote: On Thu, Jun 13, 2013 at 02:13:55PM +0530, Kishon Vijay Abraham I wrote: In order for controllers to get PHY in case of non dt boot, the phy binding information

Re: [PATCH v3 2/3] USB: serial: make minor allocation dynamic

2013-06-18 Thread Johan Hovold
@@ -123,8 +116,9 @@ static void return_serial(struct usb_ser mutex_lock(table_lock); for (i = 0; i serial-num_ports; ++i) - serial_table[serial-minor + i] = NULL; + idr_remove(serial_minors, serial-port[i]-minor); mutex_unlock(table_lock); +

Re: [PATCH v7 5/9] ARM: OMAP: USB: Add phy binding information

2013-06-18 Thread Kishon Vijay Abraham I
Hi, On Tuesday 18 June 2013 03:57 PM, Felipe Balbi wrote: Hi, On Tue, Jun 18, 2013 at 03:34:36PM +0530, Kishon Vijay Abraham I wrote: On Tuesday 18 June 2013 03:14 PM, Felipe Balbi wrote: On Thu, Jun 13, 2013 at 02:13:55PM +0530, Kishon Vijay Abraham I wrote: In order for controllers to get

Re: [PATCH v7 5/9] ARM: OMAP: USB: Add phy binding information

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 04:43:44PM +0530, Kishon Vijay Abraham I wrote: On Tue, Jun 18, 2013 at 03:34:36PM +0530, Kishon Vijay Abraham I wrote: On Tuesday 18 June 2013 03:14 PM, Felipe Balbi wrote: On Thu, Jun 13, 2013 at 02:13:55PM +0530, Kishon Vijay Abraham I wrote: In order for

Re: Detecting start/stop streaming for UVC webcam with bulk transfer mode

2013-06-18 Thread Laurent Pinchart
Hi Chetan, On Tuesday 18 June 2013 11:17:40 Chetan Nanda wrote: Hi, I am currently working with UVC camera device which send data using bulk transfer for preview and capture. I have modified UVC gadget driver to start bulk streaming on receiving first UVC_VS_COMMIT_CONTROL request from

Re: [RFC v2 0/4] Remove BUG() calls from xHCI driver

2013-06-18 Thread Mathias Nyman
On 06/17/2013 08:25 PM, Alan Stern wrote: On Mon, 17 Jun 2013, Sarah Sharp wrote: The older patchset did have some useful improvements, aside from the misguided patch to make the USB core be more robust about handling NULL pointers from usb_hub_to_struct_hub(). As discussed, that could only

[RFC v2 1/1] usb: check usb_hub_to_struct_hub() return value

2013-06-18 Thread Mathias Nyman
usb_hub_to_struct_hub() can return NULL in some unlikely cases. Add checks where appropriate, or pass the hub pointer as an additional argument if it's known to be valid. The places it makes sense to check usb_hub_to_struct_hub() are picked based on feedback from Alan Stern. Signed-off-by:

[RFC v2 0/1] usb: check usb_hub_to_struct_hub() return value

2013-06-18 Thread Mathias Nyman
This is a separate patch that addresses the feedback Alan Stern gave on patch [6/6] usb: check usb_hub_to_struct_hub() return value from the series [RFC 0/6] xHCI and USB security bug fixes Original patch was dropped from later versions of the series Changes since v1:: - removed checks where not

Re: [RFC PATCH 0/1] Intel xhci: rework EHCI/xHCI port switching

2013-06-18 Thread Alan Stern
On Mon, 17 Jun 2013, Sarah Sharp wrote: Correct me if I'm wrong here. The original idea was to switch everything over to xHCI during some early stage (like when the xHCI controller is first passed to the pci-quirks.c code) and switch back to EHCI at shutdown. As a refinement, you want

Re: [PATCH] usb: host: Faraday fotg210-hcd driver

2013-06-18 Thread Alan Stern
On Tue, 18 Jun 2013, Yuan-Hsin Chen wrote: In that case, no, you should be figuring out how to refactor and reuse the EHCI code instead of copying it straight into your driver. I was trying to use ehci-platform.c, anonymous union/struct, and quirk flags to avoid copying EHCI code. But

Re: [PATCH] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Alan Stern
On Tue, 18 Jun 2013, Felipe Balbi wrote: HI, On Tue, Jun 18, 2013 at 11:23:59AM +0300, Roger Quadros wrote: On 06/18/2013 11:01 AM, Felipe Balbi wrote: Hi, On Tue, Jun 18, 2013 at 03:15:01AM -0400, Chao Xie wrote: Some controller need software to initialize PHY before add

Re: [PATCH v7 5/9] ARM: OMAP: USB: Add phy binding information

2013-06-18 Thread Kishon Vijay Abraham I
Hi, On Tuesday 18 June 2013 06:05 PM, Felipe Balbi wrote: Hi, On Tue, Jun 18, 2013 at 04:43:44PM +0530, Kishon Vijay Abraham I wrote: On Tue, Jun 18, 2013 at 03:34:36PM +0530, Kishon Vijay Abraham I wrote: On Tuesday 18 June 2013 03:14 PM, Felipe Balbi wrote: On Thu, Jun 13, 2013 at

Re: [PATCH] usb: host: Faraday fotg210-hcd driver

2013-06-18 Thread Greg KH
On Tue, Jun 18, 2013 at 10:42:09AM +0800, Yuan-Hsin Chen wrote: Hi, On Tue, Jun 18, 2013 at 4:39 AM, Greg KH gre...@linuxfoundation.org wrote: On Wed, Jun 05, 2013 at 05:15:43PM +, Yuan-Hsin Chen wrote: FOTG210 is an OTG controller which can be configured as an USB2.0 host. FOTG210

Re: [PATCH v7 5/9] ARM: OMAP: USB: Add phy binding information

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 08:25:00PM +0530, Kishon Vijay Abraham I wrote: Hi, On Tuesday 18 June 2013 06:05 PM, Felipe Balbi wrote: Hi, On Tue, Jun 18, 2013 at 04:43:44PM +0530, Kishon Vijay Abraham I wrote: On Tue, Jun 18, 2013 at 03:34:36PM +0530, Kishon Vijay Abraham I wrote: On

Re: [PATCH] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Felipe Balbi
Hi, On Tue, Jun 18, 2013 at 10:53:26AM -0400, Alan Stern wrote: If the controllers don't want HCD core to manage the PHY they can just set it to some error code. they shouldn't have the choice, otherwise it'll be a bit of a PITA to maintain the code. ehci core tries to grab the

[RFC PATCH v1 2/6] USB: disable IRQs deliberately when calling complete()

2013-06-18 Thread Ming Lei
We disable local IRQs here in case of running complete() by tasklet to avoid possible deadlock because drivers may call spin_lock() to hold lock which might be acquired in one hard interrupt handler. The local_irq_save()/local_irq_restore() around complete() will be removed if current USB drivers

[RFC PATCH v1 6/6] USB: EHCI: support running URB giveback in tasklet context

2013-06-18 Thread Ming Lei
Both 4 transfers can work well on EHCI HCD after switching to run URB giveback in tasklet context, so mark all HCD drivers to support it. From below test results on 3 machines(2 ARM and one x86), time consumed by EHCI interrupt handler droped much without performance loss. 1 test description 1.1

[RFC PATCH v1 3/6] USB: URB documentation: claim complete() may be run with IRQs enabled

2013-06-18 Thread Ming Lei
There is no good reason to run complete() in hard interrupt disabled context. After running complete() in tasklet, we will enable local IRQs when calling complete() since we can do it now. Even though we still disable IRQs now when calling complete() in tasklet, the URB documentation is updated

[RFC PATCH v1 1/6] USB: HCD: support giveback of URB in tasklet context

2013-06-18 Thread Ming Lei
This patch implements the mechanism of giveback of URB in tasklet context, so that hardware interrupt handling time for usb host controller can be saved much, and HCD interrupt handling can be simplified. Motivations: 1), on some arch(such as ARM), DMA mapping/unmapping is a bit time-consuming,

[RFC PATCH v1 4/6] USB: EHCI: don't release ehci-lock if URB giveback in tasklet context

2013-06-18 Thread Ming Lei
If HCD_BH is set for HC driver's flags, URB giveback will be done in tasklet context instead of interrupt context, so the ehci-lock needn't to be released any more before calling usb_hcd_giveback_urb(). Cc: Alan Stern st...@rowland.harvard.edu Signed-off-by: Ming Lei ming@canonical.com ---

[RFC PATCH v1 5/6] USB: EHCI: improve interrupt qh unlink

2013-06-18 Thread Ming Lei
Given interrupt URB will be resubmitted from tasklet context which is scheduled by ehci hardware interrupt handler, and commonly only one interrupt URB is scheduled on qh, so the qh may be unlinked immediately once qh_completions() returns from ehci_irq(), then the intr URB to be resubmitted in

Re: [RFC PATCH v1 2/6] USB: disable IRQs deliberately when calling complete()

2013-06-18 Thread Sergei Shtylyov
Hello. On 18-06-2013 19:03, Ming Lei wrote: We disable local IRQs here in case of running complete() by tasklet to avoid possible deadlock because drivers may call spin_lock() to hold lock which might be acquired in one hard interrupt handler. The local_irq_save()/local_irq_restore() around

[RFC PATCH v1 0/6] USB: HCD/EHCI: giveback of URB in tasklet context

2013-06-18 Thread Ming Lei
Hi, The patchset supports to run giveback of URB in tasklet context, so that DMA unmapping/mapping on transfer buffer and compelte() callback can be run with interrupt enabled, then time of HCD interrupt handler(IRQs disabled time) can be saved much. Also this approach may simplify HCD since HCD

Re: [PATCH V2 05/10] USB: OHCI: Properly handle ohci-exynos suspend

2013-06-18 Thread Alan Stern
On Tue, 18 Jun 2013, Manjunath Goudar wrote: After Alan explanation I am writing below code end of ohci_suspend() routine.is it correct Alan. if (do_wakeup HCD_WAKEUP_PENDING(hcd)) { ohci_resume(hcd, false); rc = -EBUSY; } I'm glad you

Re: [PATCH 0/9] usb: gadget/uvc: stability and usability fixes

2013-06-18 Thread Michael Grzeschik
Hi Laurent, On Tue, Jun 04, 2013 at 05:08:19PM +0200, Michael Grzeschik wrote: Hi, this series is fixing some stability and usability issues found with the usb uvc-gadget. It's needed to make the device usable as an v4l2sink with gstreamer. Thanks, Michael Laurent Pinchart (1):

Re: [PATCH] USB: initialize or shutdown PHY when add or remove host controller

2013-06-18 Thread Alan Stern
On Tue, 18 Jun 2013, Felipe Balbi wrote: yeah, Roger brought up a big problem with OMAP's EHCI depending on the mode so, at least for now, we should keep phy_get and, in case of EHCI OMAP, phy_init in the glue :-( Roger has all the details, and they're also in the list archives, but

Re: [PATCH] build some drivers only when compile-testing

2013-06-18 Thread Greg Kroah-Hartman
On Mon, Jun 17, 2013 at 10:05:19PM +0200, Jiri Slaby wrote: On 05/23/2013 05:09 AM, Jeff Mahoney wrote: On 5/22/13 10:23 PM, Greg Kroah-Hartman wrote: On Wed, May 22, 2013 at 11:18:46AM +0200, Jiri Slaby wrote: Some drivers can be built on more platforms than they run on. This causes

Re: [RFC PATCH v1 1/6] USB: HCD: support giveback of URB in tasklet context

2013-06-18 Thread Alan Stern
On Tue, 18 Jun 2013, Ming Lei wrote: This patch implements the mechanism of giveback of URB in tasklet context, so that hardware interrupt handling time for usb host controller can be saved much, and HCD interrupt handling can be simplified. Okay. I'd make a few relatively minor changes.

Re: [RFC PATCH v1 3/6] USB: URB documentation: claim complete() may be run with IRQs enabled

2013-06-18 Thread Alan Stern
On Tue, 18 Jun 2013, Ming Lei wrote: There is no good reason to run complete() in hard interrupt disabled context. After running complete() in tasklet, we will enable local IRQs when calling complete() since we can do it now. Even though we still disable IRQs now when calling complete()

Re: [RFC PATCH v1 4/6] USB: EHCI: don't release ehci-lock if URB giveback in tasklet context

2013-06-18 Thread Alan Stern
On Tue, 18 Jun 2013, Ming Lei wrote: If HCD_BH is set for HC driver's flags, URB giveback will be done in tasklet context instead of interrupt context, so the ehci-lock needn't to be released any more before calling usb_hcd_giveback_urb(). It is premature to do this now. This should be part

Re: [RFC PATCH v1 5/6] USB: EHCI: improve interrupt qh unlink

2013-06-18 Thread Alan Stern
On Tue, 18 Jun 2013, Ming Lei wrote: Given interrupt URB will be resubmitted from tasklet context which is scheduled by ehci hardware interrupt handler, and commonly only one interrupt URB is scheduled on qh, so the qh may be unlinked immediately once qh_completions() returns from ehci_irq(),

Re: [PATCH v2 3/5] USB: OMAP1: OTG controller driver

2013-06-18 Thread Aaro Koskinen
Hi, On Tue, Jun 18, 2013 at 11:21:43AM +0300, Felipe Balbi wrote: On Sun, Jun 16, 2013 at 04:35:10PM +0300, Aaro Koskinen wrote: +#include mach/usb.h no mach/* includes under drivers/usb, sorry. It's a pain to fix those up later. Sorry, that was left there by a mistake. I will fix. A. --

Re: [RFC PATCH v1 6/6] USB: EHCI: support running URB giveback in tasklet context

2013-06-18 Thread Alan Stern
On Tue, 18 Jun 2013, Ming Lei wrote: Both 4 transfers can work well on EHCI HCD after switching to run Both 4 transfers? The word both applies when there are two items, not more than two. And what are the four transfers you are referring to? Do you mean all four transfer _types_? Alan

Re: [RFC PATCH v1 2/6] USB: disable IRQs deliberately when calling complete()

2013-06-18 Thread Alan Stern
On Tue, 18 Jun 2013, Ming Lei wrote: We disable local IRQs here in case of running complete() by tasklet to avoid possible deadlock because drivers may call spin_lock() to hold lock which might be acquired in one hard interrupt handler. The local_irq_save()/local_irq_restore() around

Re: [RFC v2 1/1] usb: check usb_hub_to_struct_hub() return value

2013-06-18 Thread Alan Stern
On Tue, 18 Jun 2013, Mathias Nyman wrote: usb_hub_to_struct_hub() can return NULL in some unlikely cases. Add checks where appropriate, or pass the hub pointer as an additional argument if it's known to be valid. The places it makes sense to check usb_hub_to_struct_hub() are picked based

[PATCH v3 2/4] USB: OMAP1: add extcon to platform data

2013-06-18 Thread Aaro Koskinen
Add extcon field to platform data. Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi --- include/linux/platform_data/usb-omap1.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/platform_data/usb-omap1.h b/include/linux/platform_data/usb-omap1.h index 8c7764d..43b5ce1 100644

[PATCH v3 3/4] USB: OMAP1: OTG controller driver

2013-06-18 Thread Aaro Koskinen
Transceivers need to manage OTG controller state on OMAP1 to enable switching between peripheral and host modes. Provide a driver for that. Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi --- drivers/usb/phy/Kconfig| 10 +++ drivers/usb/phy/Makefile | 1 +

[PATCH v3 1/4] ARM: OMAP1: USB: move omap_usb_config to platform data

2013-06-18 Thread Aaro Koskinen
Move omap_usb_config to platform data, so that OTG driver can include it. Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi Acked-by: Tony Lindgren t...@atomide.com --- arch/arm/mach-omap1/include/mach/usb.h | 38 +--- include/linux/platform_data/usb-omap1.h | 51

[PATCH v3 0/4] USB: OMAP1: Tahvo USB support for 770

2013-06-18 Thread Aaro Koskinen
Hi, These patches add support for Tahvo USB transceiver and allow using both host and peripheral modes on Nokia 770. Tested (peripheral mode, host mode, vbus detection) with 3.10-rc6. History: v3: Delete accidental #include mach/usb.h from patch 3. Drop board file changes,

[PATCH v3 4/4] USB: OMAP1: Tahvo USB transceiver driver

2013-06-18 Thread Aaro Koskinen
Add Tahvo USB transceiver driver. Based on old code from linux-omap tree. The original driver was written by Juha Yrjölä, Tony Lindgren, and Timo Teräs. Signed-off-by: Aaro Koskinen aaro.koski...@iki.fi --- drivers/usb/phy/Kconfig | 14 ++ drivers/usb/phy/Makefile| 1 +

Re: [PATCH V2 1/6] USB: OHCI: make ohci-exynos a separate driver

2013-06-18 Thread Alan Stern
On Wed, 12 Jun 2013, Manjunath Goudar wrote: Separate the Samsung OHCI EXYNOS host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11. V2:

Re: [PATCH V2 2/6] USB: OHCI: make ohci-omap a separate driver

2013-06-18 Thread Alan Stern
On Wed, 12 Jun 2013, Manjunath Goudar wrote: Separate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11. V2:

Re: [Pull Request] xhci: Remove BUG() calls from the driver

2013-06-18 Thread Greg Kroah-Hartman
On Mon, Jun 17, 2013 at 07:57:52PM -0700, Sarah Sharp wrote: The following changes since commit 976f8bef9cfb5246bc0e8dc781562daa79cb7aaf: Merge tag 'usb-for-v3.11' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next (2013-06-12 14:44:13 -0700) are available in the

Re: [RFC v2 0/1] Fix xHCI NULL pointer deref

2013-06-18 Thread Greg Kroah-Hartman
On Mon, Jun 17, 2013 at 08:05:03PM -0700, Sarah Sharp wrote: On Mon, Jun 17, 2013 at 10:41:56AM -0700, Greg Kroah-Hartman wrote: On Mon, Jun 17, 2013 at 09:56:30AM -0700, Sarah Sharp wrote: This patchset breaks out the one real bug fix patch from the Klockwork security issues patchset.

Re: [PATCH V2 2/6] USB: OHCI: make ohci-omap a separate driver

2013-06-18 Thread Alan Stern
On Wed, 12 Jun 2013, Manjunath Goudar wrote: Separate the TI OHCI OMAP1/2 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11. V2:

Re: [PATCH V2 4/6] USB: OHCI: make ohci-spear a separate driver

2013-06-18 Thread Alan Stern
On Wed, 12 Jun 2013, Manjunath Goudar wrote: Separate the ST OHCI SPEAr host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11. V2: -ohci_setup()

[PATCH 1/3] add sysfs attribute for DNTS count and interval

2013-06-18 Thread Thomas Pugliese
This patch adds a sysfs attribute for the wireless USB host controller device notification transmit slot(DNTS) count and interval. It also changes the defaults from 16 slots in every MMC to a more reasonable 4 slots every 2ms. Signed-off-by: Thomas Pugliese thomas.pugli...@gmail.com ---

[PATCH 2/3] add sysfs attribute for retry count

2013-06-18 Thread Thomas Pugliese
This patch adds a sysfs attribute for the wireless host controller transaction retry count. It also changes the default value from 15 retries to infinite retries because the driver currently does not handle retry errors gracefully. Signed-off-by: Thomas Pugliese thomas.pugli...@gmail.com ---

Re: [PATCH V2 3/6] USB: OHCI: make ohci-omap3 a separate driver

2013-06-18 Thread Alan Stern
On Wed, 12 Jun 2013, Manjunath Goudar wrote: Separate the TI OHCI OMAP3 host controller driver from ohci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; it would be nice to have in 3.11. V2: -ohci_setup()

[PATCH 0/3] USB: wusbcore: add sysfs attributes for HC parameters

2013-06-18 Thread Thomas Pugliese
This patch set adds sysfs attributes to the wusbhc for DNTS count and interval and the host controller transaction retry count. Thomas Pugliese (3): add sysfs attribute for DNTS count and interval add sysfs attribute for retry count add entries in Documentation/ABI for new wusbhc sysfs

[PATCH 3/3] add entries in Documentation/ABI for new wusbhc sysfs attributes

2013-06-18 Thread Thomas Pugliese
Add documenation for new ABI entries. Signed-off-by: Thomas Pugliese thomas.pugli...@gmail.com --- Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc | 19 +++ 1 file changed, 19 insertions(+) diff --git a/Documentation/ABI/testing/sysfs-class-uwb_rc-wusbhc

Re: linux-next: Tree for Jun 18 usb/chipidea)

2013-06-18 Thread Randy Dunlap
On 06/18/13 00:30, Stephen Rothwell wrote: Hi all, Changes since 20130617: on i386: # CONFIG_USB_PHY is not set drivers/built-in.o: In function `ci_hdrc_probe': core.c:(.text+0x20446b): undefined reference to `of_usb_get_phy_mode' chipidea needs to depend on or select some kind of

Re: Crash in xhci_hcd for 3.10-rc5 (old 3.5.0 bug)

2013-06-18 Thread Jérôme Poulin
On Wed, Jun 12, 2013 at 9:25 PM, Jérôme Poulin jeromepou...@gmail.com wrote: That seems to make sense, I don't have my laptop with me but I can say I didn't try. After checking it out, UAS does not seem to be compiled in nor as a module on my current kernel. A Ubuntu bug was already open on

  1   2   >