Re: [PATCH 1/2] extcon: extcon-dra7xx: Add extcon driver for USB ID detection

2013-08-19 Thread George Cherian
Hi Stephen, Thanks for your review. On 8/20/2013 1:01 AM, Stephen Warren wrote: On 08/16/2013 04:13 AM, George Cherian wrote: Adding extcon driver for USB ID detection to dynamically configure USB Host/Peripheral mode. diff --git a/Documentation/devicetree/bindings/extcon/extcon-dra7xx.txt b

Re: [PATCH] chipidea: ci_hdrc_imx: Fix MODULE_ALIAS()

2013-08-19 Thread Peter Chen
On Mon, Aug 19, 2013 at 03:36:33PM -0300, Fabio Estevam wrote: > The MODULE_ALIAS string should match the '.name' field of the platform driver. > > In this case we have '.name = "imx_usb"', so adapt MODULE_ALIAS() accordingly. > > Signed-off-by: Fabio Estevam > --- > drivers/usb/chipidea/ci_hdr

Re: [PATCH 1/2] extcon: extcon-dra7xx: Add extcon driver for USB ID detection

2013-08-19 Thread Chanwoo Choi
Hi George, On 08/16/2013 07:13 PM, George Cherian wrote: > Adding extcon driver for USB ID detection to dynamically > configure USB Host/Peripheral mode. > > Signed-off-by: George Cherian > --- > .../devicetree/bindings/extcon/extcon-dra7xx.txt | 19 ++ > drivers/extcon/Kconfig

Re: RE: [PATCH v2 0/8] Common Clock Framework support for Samsung S3C64xx

2013-08-19 Thread Mike Turquette
Quoting Kukjin Kim (2013-08-17 03:30:11) > Tomasz Figa wrote: > > [...] > > > > > > > > > > > > > Basically, this series looks good to me, but I'm not sure how this > > > > > > should be handled because of dependency with PWM cleanup and clk > > > > > > stuff > > > > > > in clk tree now... > > >

[BUG] ohci-pci: devices not detected after hibernate

2013-08-19 Thread Steve Cotton
Last working release: 3.10 Bisected earliest broken: c1117afb85 Broken in: 3.11-rc1, 3.11-rc6, bd479f2933 (the current usb-next) Once my PC has been hibernated and resumed, some devices plugged in to the on-motherboard ports stop working, and don't show up in lsusb. The pattern seems to be that p

Re: [Pull Request] xhci: Step 2 to fix usb-linus and usb-next.

2013-08-19 Thread Greg KH
On Thu, Aug 15, 2013 at 06:44:03PM -0700, Sarah Sharp wrote: > The following changes since commit 224563b6ce034b82f8511969d9496113da34fb2c: > > Merge tag 'for-usb-next-2013-08-15' of > git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next > (2013-08-15 17:33:16 -0700) > > are

Re: [PATCH v2 1/4] staging: usbip: add "-P" / "--pid" option to save usbipd process id

2013-08-19 Thread Anthony Foiani
Greg KH writes: > On Sat, Aug 17, 2013 at 03:34:31PM -0600, Anthony Foiani wrote: > > Introduce option "-P" / "--pid" to request that usbipd save its > > PID to a file while running. > > Shouldn't this be the requirement of the tool that starts it up > (i.e. systemd or sysvinit)? Putting stuff

Re: [PATCH v2 2/4] staging: usbip: set usbipd server port via "-t" / "--tcp-port" option.

2013-08-19 Thread Anthony Foiani
Greg KH writes: > On Sat, Aug 17, 2013 at 03:34:32PM -0600, Anthony Foiani wrote: > > +int USBIP_PORT = 3240; > > +char *USBIP_PORT_STRING = "3240"; > > Variables shouldn't be ALL_CAPS, those are what #defines are for. > Yes, I know you moved from a define to a variable, Right, I was trying to m

Re: [PATCH] Fix stack corruption on some architectures

2013-08-19 Thread Daniel Gimpelevich
On Tue, 2013-08-20 at 02:31 +0400, Sergei Shtylyov wrote: > Hello. > > On 08/20/2013 12:37 AM, Daniel Gimpelevich wrote: > > > There is no need to get an interface specification if we know it's the > > wrong one; trivial change. > > Is it related to stack corruption? If not, it's asking to

Re: [PATCH v2 2/4] staging: usbip: set usbipd server port via "-t" / "--tcp-port" option.

2013-08-19 Thread Greg KH
On Sat, Aug 17, 2013 at 03:34:32PM -0600, Anthony Foiani wrote: > +int USBIP_PORT = 3240; > +char *USBIP_PORT_STRING = "3240"; Variables shouldn't be ALL_CAPS, those are what #defines are for. Yes, I know you moved from a define to a variable, but please make it obvious and change the name as wel

Re: [PATCH v2 1/4] staging: usbip: add "-P" / "--pid" option to save usbipd process id

2013-08-19 Thread Greg KH
On Sat, Aug 17, 2013 at 03:34:31PM -0600, Anthony Foiani wrote: > Introduce option "-P" / "--pid" to request that usbipd save its PID to > a file while running. Shouldn't this be the requirement of the tool that starts it up (i.e. systemd or sysvinit)? Putting stuff like /var/run into the daemon

Re: [PATCH] Fix stack corruption on some architectures

2013-08-19 Thread Sergei Shtylyov
Hello. On 08/20/2013 12:37 AM, Daniel Gimpelevich wrote: There is no need to get an interface specification if we know it's the wrong one; trivial change. Is it related to stack corruption? If not, it's asking to be in a separate patch. The big thing, though, was explained in the #mips

Re: [PATCH] Fix stack corruption on some architectures

2013-08-19 Thread Greg Kroah-Hartman
On Mon, Aug 19, 2013 at 01:37:27PM -0700, Daniel Gimpelevich wrote: > There is no need to get an interface specification if we know it's the > wrong one; trivial change. The big thing, though, was explained in the > #mipslinux IRC channel: > [Mon 2013-08-19 12:28:21 PM PDT] guys, are you sure it'

[PATCH] Fix stack corruption on some architectures

2013-08-19 Thread Daniel Gimpelevich
There is no need to get an interface specification if we know it's the wrong one; trivial change. The big thing, though, was explained in the #mipslinux IRC channel: [Mon 2013-08-19 12:28:21 PM PDT] guys, are you sure it's not "DMA off stack" case? [Mon 2013-08-19 12:28:35 PM PDT] it's a known

Re: USB gadget on mx6

2013-08-19 Thread Fabio Estevam
Hi Marek, On Mon, Aug 19, 2013 at 4:43 PM, Marek Vasut wrote: > Are you not missing usbmisc or vbus regulator ? usbmisc is in the .dtsi otg node. vbus is only needed on usb host or otg modes, right? I would like to setup usb otg port in peripheral mode only. -- To unsubscribe from this list:

Re: [PATCH 5/6] for fixing xhci_readl call in xhci_hub.c after removing xhci_hcd from function definition

2013-08-19 Thread Sarah Sharp
On Sat, Aug 17, 2013 at 07:08:15PM +0300, Dan Carpenter wrote: > On Fri, Aug 16, 2013 at 12:24:34PM -0700, Sarah Sharp wrote: > > In general, please keep the short descriptions of your patches (which > > turn into the subject lines of your mails) limited to around 55 > > characters. > > 55 is a ve

Re: USB gadget on mx6

2013-08-19 Thread Marek Vasut
Dear Fabio Estevam, > Hi, > > I am running today's linux-next and I am trying to enable usb gadget on > mx6: > > diff --git a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi > b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi > index a55113e..ef757d2 100644 > --- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi > +

Re: [PATCH 1/2] extcon: extcon-dra7xx: Add extcon driver for USB ID detection

2013-08-19 Thread Stephen Warren
On 08/16/2013 04:13 AM, George Cherian wrote: > Adding extcon driver for USB ID detection to dynamically > configure USB Host/Peripheral mode. > diff --git a/Documentation/devicetree/bindings/extcon/extcon-dra7xx.txt > b/Documentation/devicetree/bindings/extcon/extcon-dra7xx.txt > +EXTCON FOR DR

[PATCH] chipidea: ci_hdrc_imx: Fix MODULE_ALIAS()

2013-08-19 Thread Fabio Estevam
The MODULE_ALIAS string should match the '.name' field of the platform driver. In this case we have '.name = "imx_usb"', so adapt MODULE_ALIAS() accordingly. Signed-off-by: Fabio Estevam --- drivers/usb/chipidea/ci_hdrc_imx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/d

USB gadget on mx6

2013-08-19 Thread Fabio Estevam
Hi, I am running today's linux-next and I am trying to enable usb gadget on mx6: diff --git a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi index a55113e..ef757d2 100644 --- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi +++ b/arch/arm/boot/dts/imx6qdl-wandboard.

Re: [PATCH] usb: phy: Cleanup error code in **_usb_get_phy_**() APIs

2013-08-19 Thread Julius Werner
>> I liked the ones where we had IS_ERR_OR_NULL() here (and in all the >> ones below)... you sometimes have to handle PHYs in >> platform-independent code where you don't want to worry about if this >> platform actually has a PHY driver there or not. Any reason you >> changed that? > > The **get_ph

Re: [PATCH] i2c-tiny-usb: do not use stack as URB transfer_buffer

2013-08-19 Thread Wolfram Sang
On Thu, Aug 15, 2013 at 10:46:32PM +0300, Jussi Kivilinna wrote: > On 15.08.2013 20:55, Wolfram Sang wrote: > > On Tue, Aug 06, 2013 at 02:17:42PM +0300, Jussi Kivilinna wrote: > >> Patch fixes i2c-tiny-usb not to use stack as URB transfer_buffer. URB > >> buffers > >> need to be DMA-able, which s

[PATCH v2] usb: xhci: Disable runtime PM suspend for quirky controllers

2013-08-19 Thread Shawn Nematbakhsh
If a USB controller with XHCI_RESET_ON_RESUME goes to runtime suspend, a reset will be performed upon runtime resume. Any previously suspended devices attached to the controller will be re-enumerated at this time. This will cause problems, for example, if an open system call on the device triggered

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Greg Kroah-Hartman
On Mon, Aug 19, 2013 at 10:14:57AM -0700, Greg Kroah-Hartman wrote: > On Mon, Aug 19, 2013 at 11:40:50PM +0800, Ming Lei wrote: > > On Mon, Aug 19, 2013 at 11:14 PM, Greg Kroah-Hartman > > wrote: > > > On Mon, Aug 19, 2013 at 11:06:31PM +0800, Ming Lei wrote: > > >> On Mon, Aug 19, 2013 at 10:00 P

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Alan Stern
On Mon, 19 Aug 2013, Ming Lei wrote: > Another disadvantage is that accessing the shared variable is still > slower than accessing one percpu variable in theory. By that argument, _everything_ in the kernel should be percpu. There is a reason why atomic variables exist. Alan Stern -- To unsub

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Alan Stern
On Mon, 19 Aug 2013, Bjørn Mork wrote: > Alan Stern writes: > > > No doubt somebody would complain if the counter was removed. Who added > > it in the first place, and for what reason? > > Who and why is pretty well documented: > http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Greg Kroah-Hartman
On Mon, Aug 19, 2013 at 11:40:50PM +0800, Ming Lei wrote: > On Mon, Aug 19, 2013 at 11:14 PM, Greg Kroah-Hartman > wrote: > > On Mon, Aug 19, 2013 at 11:06:31PM +0800, Ming Lei wrote: > >> On Mon, Aug 19, 2013 at 10:00 PM, Greg Kroah-Hartman > >> wrote: > >> > On Mon, Aug 19, 2013 at 07:04:18PM +

Re: [PATCH 1/3] of: add vendor prefix for Mentor Graphics

2013-08-19 Thread Sebastian Andrzej Siewior
On 08/19/2013 05:50 PM, Stephen Warren wrote: arch/arm/boot/dts/am33xx.dtsi:375: compatible = "mg,musbmhdrc"; arch/arm/boot/dts/am33xx.dtsi:430: compatible = "mg,musbmhdrc"; >>> arch/arm/boot/dts/dbx5x0.dtsi:

Re: [PATCH v3 1/3] usb: dwc3: msm: Add device tree binding information

2013-08-19 Thread Stephen Boyd
On 08/19/13 05:27, Ivan T. Ivanov wrote: > Hi, > > On Fri, 2013-08-16 at 16:44 -0600, Stephen Warren wrote: >> On 08/14/2013 06:59 AM, Ivan T. Ivanov wrote: >>> From: "Ivan T. Ivanov" >>> >>> MSM USB3.0 core wrapper consist of USB3.0 IP from Synopsys >>> (SNPS) and HS, SS PHY's control and confi

Re: [PATCH v3 1/3] usb: dwc3: msm: Add device tree binding information

2013-08-19 Thread Stephen Warren
On 08/19/2013 06:27 AM, Ivan T. Ivanov wrote: > > Hi, > > On Fri, 2013-08-16 at 16:44 -0600, Stephen Warren wrote: >> On 08/14/2013 06:59 AM, Ivan T. Ivanov wrote: >>> From: "Ivan T. Ivanov" >>> >>> MSM USB3.0 core wrapper consist of USB3.0 IP from Synopsys >>> (SNPS) and HS, SS PHY's control

Re: Non-enumerable devices on USB and other enumerable buses

2013-08-19 Thread Mark Brown
On Mon, Aug 19, 2013 at 08:17:53PM +0800, Ming Lei wrote: > On Sat, Aug 17, 2013 at 9:29 AM, Alan Stern wrote: > > Aong those lines, I would like to point out that the device concept > > embodied in the kernel's data structures can be pretty thin. For > > example, it might be little more than a

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Paul E. McKenney
On Mon, Aug 19, 2013 at 11:40:50PM +0800, Ming Lei wrote: > On Mon, Aug 19, 2013 at 11:14 PM, Greg Kroah-Hartman > wrote: > > On Mon, Aug 19, 2013 at 11:06:31PM +0800, Ming Lei wrote: > >> On Mon, Aug 19, 2013 at 10:00 PM, Greg Kroah-Hartman > >> wrote: > >> > On Mon, Aug 19, 2013 at 07:04:18PM +

[PATCH] usb: musb: dsps: fix devm_ioremap_resource error detection code

2013-08-19 Thread Julia Lawall
From: Julia Lawall devm_ioremap_resource returns an ERR_PTR value, not NULL, on failure. Furthermore, the value returned by devm_ioremap_resource should be tested. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression e,

Re: [PATCH 1/3] of: add vendor prefix for Mentor Graphics

2013-08-19 Thread Stephen Warren
On 08/17/2013 03:27 AM, Sebastian Andrzej Siewior wrote: > On 08/17/2013 12:52 AM, Stephen Warren wrote: >> On 08/15/2013 07:13 AM, Sebastian Andrzej Siewior wrote: >>> This prefix is currently used for the musb driver. >> >>> diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt >>>

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Bjørn Mork
Alan Stern writes: > No doubt somebody would complain if the counter was removed. Who added > it in the first place, and for what reason? Who and why is pretty well documented: http://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=4d59d8a11383ebf0e0260ee481a4e766959fd7d9 T

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Ming Lei
On Mon, Aug 19, 2013 at 11:33 PM, Alan Stern wrote: > On Mon, 19 Aug 2013, Ming Lei wrote: > >> > As far as I can see, this counter does not need to be exact. Why not >> > simply make it a non-atomic unsigned int? >> >> It may becomes quite inaccurate, and 4.1 of the perfbook mentioned >> that ha

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Ming Lei
On Mon, Aug 19, 2013 at 11:14 PM, Greg Kroah-Hartman wrote: > On Mon, Aug 19, 2013 at 11:06:31PM +0800, Ming Lei wrote: >> On Mon, Aug 19, 2013 at 10:00 PM, Greg Kroah-Hartman >> wrote: >> > On Mon, Aug 19, 2013 at 07:04:18PM +0800, Ming Lei wrote: >> >> Because usb_hcd_submit_urb is in the hotes

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Alan Stern
On Mon, 19 Aug 2013, Ming Lei wrote: > > As far as I can see, this counter does not need to be exact. Why not > > simply make it a non-atomic unsigned int? > > It may becomes quite inaccurate, and 4.1 of the perfbook mentioned > that half of counts might be lost with simple non-atomic unsigned i

Re: [PATCH 3/3] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-19 Thread Alan Stern
On Mon, 19 Aug 2013, Ming Lei wrote: > This patch introduces ehci_disable_event(), which is applied on > IAA_WATCHDOG and START_UNLINK_INTR events in case that the two > events needn't to be handled, so that we may avoid unnecessary CPU > wakeup. > @@ -100,6 +100,20 @@ static void ehci_enable_eve

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Ming Lei
On Mon, Aug 19, 2013 at 11:17 PM, Alan Stern wrote: > On Mon, 19 Aug 2013, Ming Lei wrote: > >> On Mon, Aug 19, 2013 at 10:42 PM, Alan Stern >> wrote: >> > On Mon, 19 Aug 2013, Ming Lei wrote: >> > >> >> Because usb_hcd_submit_urb is in the hotest path of usb core, >> >> so use percpu counter to

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Alan Stern
On Mon, 19 Aug 2013, Ming Lei wrote: > On Mon, Aug 19, 2013 at 10:42 PM, Alan Stern > wrote: > > On Mon, 19 Aug 2013, Ming Lei wrote: > > > >> Because usb_hcd_submit_urb is in the hotest path of usb core, > >> so use percpu counter to count URB instead of using atomic variable > >> because atomi

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Greg Kroah-Hartman
On Mon, Aug 19, 2013 at 11:06:31PM +0800, Ming Lei wrote: > On Mon, Aug 19, 2013 at 10:00 PM, Greg Kroah-Hartman > wrote: > > On Mon, Aug 19, 2013 at 07:04:18PM +0800, Ming Lei wrote: > >> Because usb_hcd_submit_urb is in the hotest path of usb core, > >> so use percpu counter to count URB instead

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Ming Lei
On Mon, Aug 19, 2013 at 10:42 PM, Alan Stern wrote: > On Mon, 19 Aug 2013, Ming Lei wrote: > >> Because usb_hcd_submit_urb is in the hotest path of usb core, >> so use percpu counter to count URB instead of using atomic variable >> because atomic operations are much slower than percpu operations.

Re: [PATCH] usb: USB host support should depend on HAS_DMA

2013-08-19 Thread Alan Stern
On Sun, 18 Aug 2013, Geert Uytterhoeven wrote: > On Thu, Jul 11, 2013 at 1:12 AM, Arnd Bergmann wrote: > > On Wednesday 10 July 2013, Alan Stern wrote: > >> This isn't right. There are USB host controllers that use PIO, not > >> DMA. The HAS_DMA dependency should go with the controller driver,

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Ming Lei
On Mon, Aug 19, 2013 at 10:00 PM, Greg Kroah-Hartman wrote: > On Mon, Aug 19, 2013 at 07:04:18PM +0800, Ming Lei wrote: >> Because usb_hcd_submit_urb is in the hotest path of usb core, >> so use percpu counter to count URB instead of using atomic variable >> because atomic operations are much slow

Re: [RFC PATCH 2/3] USB: kill urb->use_count atomic variable

2013-08-19 Thread Alan Stern
On Mon, 19 Aug 2013, Ming Lei wrote: > This patch kills atomic_inc/atomic_dec operations on > urb->use_count in URB submit/complete path. > > The urb->use_count is only used for unlinking URB, and it isn't > necessary defined as atomic counter, so the variable is renamed > as urb->use_flag for th

Re: [PATCH 4/6 v2] usb: musb: dsps: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Dan Carpenter
On Mon, Aug 19, 2013 at 06:29:37PM +0400, Sergei Shtylyov wrote: > Hello. > > On 08/19/2013 03:47 PM, Julia Lawall wrote: > > >From: Julia Lawall > > >Remove unneeded error handling on the result of a call to > >platform_get_resource_byname when the value is passed to > >devm_ioremap_resource.

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Alan Stern
On Mon, 19 Aug 2013, Ming Lei wrote: > Because usb_hcd_submit_urb is in the hotest path of usb core, > so use percpu counter to count URB instead of using atomic variable > because atomic operations are much slower than percpu operations. This seems like a ridiculous amount of additional overhead

Re: [RFC PATCH 2/3] USB: kill urb->use_count atomic variable

2013-08-19 Thread Greg Kroah-Hartman
On Mon, Aug 19, 2013 at 07:04:19PM +0800, Ming Lei wrote: > This patch kills atomic_inc/atomic_dec operations on > urb->use_count in URB submit/complete path. Any reason only this patch was "RFC"? And you didn't kill them all, please look closer, this should have no affect on "speed", did you mea

Re: FUSB200 xhci issue

2013-08-19 Thread Alan Stern
On Mon, 19 Aug 2013, Oleksij Rempel wrote: > >> I assume, no i need to add to the driver some kind of firmware check. > >> What is the proper way to do it? > > > > The simplest way is to put a new value for the device descriptor's > > bcdDevice value in the firmware. Then all you have to do is ch

Re: [PATCH 4/6 v2] usb: musb: dsps: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Julia Lawall
On Mon, 19 Aug 2013, Sergei Shtylyov wrote: > Hello. > > On 08/19/2013 03:47 PM, Julia Lawall wrote: > > > From: Julia Lawall > > > Remove unneeded error handling on the result of a call to > > platform_get_resource_byname when the value is passed to > > devm_ioremap_resource. > > > A simplifie

Re: [PATCH 3/3] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-19 Thread Greg Kroah-Hartman
On Mon, Aug 19, 2013 at 07:04:20PM +0800, Ming Lei wrote: > This patch introduces ehci_disable_event(), which is applied on > IAA_WATCHDOG and START_UNLINK_INTR events in case that the two > events needn't to be handled, so that we may avoid unnecessary CPU > wakeup. Why would those events not nee

Re: [PATCH 4/6 v2] usb: musb: dsps: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Sergei Shtylyov
Hello. On 08/19/2013 03:47 PM, Julia Lawall wrote: From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource_byname when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows:

Re: [PATCH v4 4/8] usb: phy: omap-usb3: Don't use omap_get_control_dev()

2013-08-19 Thread Roger Quadros
Hi Sergei, On 08/19/2013 05:23 PM, Sergei Shtylyov wrote: > Hello. > > On 08/19/2013 02:37 PM, Roger Quadros wrote: > >> omap_get_control_dev() is being deprecated as it doesn't support >> multiple instances. As control device is present only from OMAP4 >> onwards which supports DT only, we use

Re: [PATCH v4 4/8] usb: phy: omap-usb3: Don't use omap_get_control_dev()

2013-08-19 Thread Sergei Shtylyov
Hello. On 08/19/2013 02:37 PM, Roger Quadros wrote: omap_get_control_dev() is being deprecated as it doesn't support multiple instances. As control device is present only from OMAP4 onwards which supports DT only, we use phandles to get the reference to the control device. As we don't suppor

Re: [PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Greg Kroah-Hartman
On Mon, Aug 19, 2013 at 07:04:18PM +0800, Ming Lei wrote: > Because usb_hcd_submit_urb is in the hotest path of usb core, > so use percpu counter to count URB instead of using atomic variable > because atomic operations are much slower than percpu operations. > > Cc: Oliver Neukum > Cc: Alan Ster

Re: [PATCH v1 44/49] sound: usb: midi: prepare for enabling irq in complete()

2013-08-19 Thread Takashi Iwai
At Sun, 18 Aug 2013 00:25:09 +0800, Ming Lei wrote: > > Complete() will be run with interrupt enabled, so change to > spin_lock_irqsave(). > > Cc: Jaroslav Kysela > Cc: Takashi Iwai Acked-by: Takashi Iwai thanks, Takashi > Cc: Clemens Ladisch > Cc: alsa-de...@alsa-project.org > Signed-o

Re: [PATCH v1 45/49] sound: usb: caiaq: prepare for enabling irq in complete()

2013-08-19 Thread Takashi Iwai
At Sun, 18 Aug 2013 00:25:10 +0800, Ming Lei wrote: > > Complete() will be run with interrupt enabled, so change to > spin_lock_irqsave(). > > Cc: Jaroslav Kysela > Cc: Takashi Iwai Acked-by: Takashi Iwai thanks, Takashi > Cc: alsa-de...@alsa-project.org > Acked-by: Daniel Mack > Signed

Re: [PATCH v3 1/3] usb: dwc3: msm: Add device tree binding information

2013-08-19 Thread Ivan T. Ivanov
Hi, On Fri, 2013-08-16 at 16:44 -0600, Stephen Warren wrote: > On 08/14/2013 06:59 AM, Ivan T. Ivanov wrote: > > From: "Ivan T. Ivanov" > > > > MSM USB3.0 core wrapper consist of USB3.0 IP from Synopsys > > (SNPS) and HS, SS PHY's control and configuration registers. > > > > It could operate

Re: Non-enumerable devices on USB and other enumerable buses

2013-08-19 Thread Ming Lei
On Sat, Aug 17, 2013 at 9:29 AM, Alan Stern wrote: > On Fri, 16 Aug 2013, Mark Brown wrote: > >> > Besides, you need to get the platform information to the driver in any >> > case, no matter how you decide to solve the chicken-and-egg problem. >> > It shouldn't be a factor in deciding which soluti

Re: [PATCH 4/6] usb: musb: dsps: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Julia Lawall
On Mon, 19 Aug 2013, Svenning Sørensen wrote: > > On 19-08-2013 13:35, Julia Lawall wrote: > > reg_base = devm_ioremap_resource(dev, r); > > if (!musb->ctrl_base) > > return -EINVAL; > > > Not really related to Julia's patch, apart from making it more obvious > > > that > > > t

Re: [PATCH 4/6] usb: musb: dsps: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Svenning Sørensen
On 19-08-2013 13:35, Julia Lawall wrote: reg_base = devm_ioremap_resource(dev, r); if (!musb->ctrl_base) return -EINVAL; Not really related to Julia's patch, apart from making it more obvious that there's a bug here. I believe it is reg_base that needs to be chec

[PATCH 4/6 v2] usb: musb: dsps: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource_byname when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,e

Re: [PATCH 4/6] usb: musb: dsps: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Julia Lawall
On Mon, 19 Aug 2013, Svenning Sørensen wrote: > On 19-08-2013 10:51, Julia Lawall wrote: > > diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c > > index 4ffbaac..f2f9710 100644 > > --- a/drivers/usb/musb/musb_dsps.c > > +++ b/drivers/usb/musb/musb_dsps.c > > @@ -357,9 +357

Re: [PATCH 4/6] usb: musb: dsps: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Svenning Sørensen
On 19-08-2013 10:51, Julia Lawall wrote: diff --git a/drivers/usb/musb/musb_dsps.c b/drivers/usb/musb/musb_dsps.c index 4ffbaac..f2f9710 100644 --- a/drivers/usb/musb/musb_dsps.c +++ b/drivers/usb/musb/musb_dsps.c @@ -357,9 +357,6 @@ static int dsps_musb_init(struct musb *musb) u32 rev, v

[RFC PATCH 2/3] USB: kill urb->use_count atomic variable

2013-08-19 Thread Ming Lei
This patch kills atomic_inc/atomic_dec operations on urb->use_count in URB submit/complete path. The urb->use_count is only used for unlinking URB, and it isn't necessary defined as atomic counter, so the variable is renamed as urb->use_flag for this purpose, then reading/writing the flag is still

[PATCH 3/3] USB: EHCI: disable IAA_WATCHDOG and START_UNLINK_INTR if they needn't to be handled

2013-08-19 Thread Ming Lei
This patch introduces ehci_disable_event(), which is applied on IAA_WATCHDOG and START_UNLINK_INTR events in case that the two events needn't to be handled, so that we may avoid unnecessary CPU wakeup. Cc: Alan Stern Signed-off-by: Ming Lei --- drivers/usb/host/ehci-hcd.c | 12 +---

[PATCH] USB: mos7720: fix big-endian control requests

2013-08-19 Thread Johan Hovold
Fix endianess bugs in parallel-port code which caused corrupt control-requests to be issued on big-endian machines. Reported-by: kbuild test robot Cc: sta...@vger.kernel.org Signed-off-by: Johan Hovold --- Here's another endianess fix detected by sparse after a recent change to these lines whic

[PATCH 1/3] USB: use percpu counter to count submitted URBs per device

2013-08-19 Thread Ming Lei
Because usb_hcd_submit_urb is in the hotest path of usb core, so use percpu counter to count URB instead of using atomic variable because atomic operations are much slower than percpu operations. Cc: Oliver Neukum Cc: Alan Stern Signed-off-by: Ming Lei --- drivers/usb/core/hcd.c |4 ++--

Re: [PATCH v3] usb: phy: am335x: add wakeup support

2013-08-19 Thread Roger Quadros
On 08/19/2013 01:39 PM, Sebastian Andrzej Siewior wrote: > This is based on George Cherian's patch which added power & wakeup > support to am335x and does no longer apply since I took some if the code > apart in favor of the multi instance support. > This compiles and I boots and later it detects a

[PATCH v3] usb: phy: am335x: add wakeup support

2013-08-19 Thread Sebastian Andrzej Siewior
This is based on George Cherian's patch which added power & wakeup support to am335x and does no longer apply since I took some if the code apart in favor of the multi instance support. This compiles and I boots and later it detects a device after I plug it in :) Could somebody please test it so it

[PATCH v4 4/8] usb: phy: omap-usb3: Don't use omap_get_control_dev()

2013-08-19 Thread Roger Quadros
omap_get_control_dev() is being deprecated as it doesn't support multiple instances. As control device is present only from OMAP4 onwards which supports DT only, we use phandles to get the reference to the control device. As we don't support non-DT boot, we just bail out on probe if device node is

[PATCH v4 5/8] usb: musb: omap2430: Don't use omap_get_control_dev()

2013-08-19 Thread Roger Quadros
omap_get_control_dev() is being deprecated as it doesn't support multiple instances. As control device is present only from OMAP4 onwards which supports DT only, we use phandles to get the reference to the control device. Also get rid of "ti,has-mailbox" property as it is redundant and we can dete

[PATCH v4 3/8] usb: phy: omap-usb2: Don't use omap_get_control_dev()

2013-08-19 Thread Roger Quadros
omap_get_control_dev() is being deprecated as it doesn't support multiple instances. As control device is present only from OMAP4 onwards which supports DT only, we use phandles to get the reference to the control device. As we don't support non-DT boot, we just bail out on probe if device node is

[PATCH v4 7/8] ARM: dts: omap4: update omap-control-usb nodes

2013-08-19 Thread Roger Quadros
Split otghs_ctrl and USB2 PHY power down into separate omap-control-usb nodes. Get rid of "ti,type" property. Also get rid of "ti,has-mailbox" property from usb_otg_hs node and provide the ctrl-module phandle. CC: Benoit Cousson Signed-off-by: Roger Quadros --- arch/arm/boot/dts/omap4.dtsi |

[PATCH v4 6/8] usb: phy: omap: get rid of omap_get_control_dev()

2013-08-19 Thread Roger Quadros
This function was preventing us from supporting multiple instances. Get rid of it. Since we support DT boots only, users can get the control device phandle from the DT node. Signed-off-by: Roger Quadros --- drivers/usb/phy/phy-omap-control.c | 31 ++- include/linu

[PATCH v4 0/8] phy: omap-usb: Support multiple instances and new types

2013-08-19 Thread Roger Quadros
Hi, This patchset does the following: * Get rid of omap_control_usb platform data as we support DT only. * Restructure and add support for new PHY types. We now support the follwing four types TYPE_OMAP - if it has otghs_control mailbox register (e.g. on OMAP4) TYPE_USB2 - if it has Power dow

[PATCH v4 2/8] usb: phy: omap: Add new device types and remove omap_control_usb3_phy_power()

2013-08-19 Thread Roger Quadros
Add support for new device types and in the process rid of "ti,type" device tree property. The correct type of device will be determined from the compatible string instead. Introduce a compatible string for each device type. At the moment we support 4 types Mailbox, USB2, USB3 and DRA7. Update DT

[PATCH v4 8/8] ARM: dts: omap5: update omap-control-usb node

2013-08-19 Thread Roger Quadros
Split USB2 PHY and USB3 PHY into separate omap-control-usb nodes. Get rid of "ti,type" property. CC: Benoit Cousson Signed-off-by: Roger Quadros --- arch/arm/boot/dts/omap5.dtsi | 20 1 files changed, 12 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/omap5.

[PATCH v4 1/8] usb: phy: omap-control: Get rid of platform data

2013-08-19 Thread Roger Quadros
omap-control device is present from OMAP4 onwards which support device tree boots only. So get rid of platform data. Signed-off-by: Roger Quadros --- drivers/usb/phy/phy-omap-control.c | 18 +++--- include/linux/usb/omap_control_usb.h |4 2 files changed, 7 insertions(+)

Re: [PATCH v2] usb: phy: am335x: add wakeup support

2013-08-19 Thread Roger Quadros
Sebastian, On 08/19/2013 01:12 PM, Sebastian Andrzej Siewior wrote: > This is based on George Cherian's patch which added power & wakeup > support to am335x and does no longer apply since I took some if the code > apart in favor of the multi instance support. > This compiles and I boots and later

[PATCH v2] usb: phy: am335x: add wakeup support

2013-08-19 Thread Sebastian Andrzej Siewior
This is based on George Cherian's patch which added power & wakeup support to am335x and does no longer apply since I took some if the code apart in favor of the multi instance support. This compiles and I boots and later it detects a device after I plug it in :) Could somebody please test it so it

Re: [PATCH] usb: phy: am335x: add wakeup support

2013-08-19 Thread Sebastian Andrzej Siewior
On 08/19/2013 10:04 AM, Roger Quadros wrote: > No, I just meant about the sequence, i.e. first configure the wakeup > and then power down the phy. > > e.g. > > if (device_may_wakeup()) > set wakeup; > power down; I don't see the difference but yes, this can be arranged. > > cheers, > -ro

[PATCH 4/6] usb: musb: dsps: simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Julia Lawall
From: Julia Lawall Remove unneeded error handling on the result of a call to platform_get_resource_byname when the value is passed to devm_ioremap_resource. A simplified version of the semantic patch that makes this change is as follows: (http://coccinelle.lip6.fr/) // @@ expression pdev,res,e

[PATCH 0/6] simplify platform_get_resource_byname/devm_ioremap_resource

2013-08-19 Thread Julia Lawall
devm_ioremap_resource often uses the result of a call to platform_get_resource_byname as its last argument. devm_ioremap_resource does appropriate error handling on this argument, so error handling can be removed from the call to platform_get_resource_byname. The semantic patch that makes this ch

Re: [PATCH] usb: phy: am335x: add wakeup support

2013-08-19 Thread Roger Quadros
On 08/19/2013 10:58 AM, Sebastian Andrzej Siewior wrote: > On 08/19/2013 09:34 AM, Roger Quadros wrote: >> Hi Sebastian, > > Hi Roger, > >>> diff --git a/drivers/usb/phy/phy-am335x.c b/drivers/usb/phy/phy-am335x.c >>> index c4d614d..1d0cd96 100644 >>> --- a/drivers/usb/phy/phy-am335x.c >>> +++ b/

Re: [PATCH] usb: phy: am335x: add wakeup support

2013-08-19 Thread Sebastian Andrzej Siewior
On 08/19/2013 09:34 AM, Roger Quadros wrote: > Hi Sebastian, Hi Roger, >> diff --git a/drivers/usb/phy/phy-am335x.c b/drivers/usb/phy/phy-am335x.c >> index c4d614d..1d0cd96 100644 >> --- a/drivers/usb/phy/phy-am335x.c >> +++ b/drivers/usb/phy/phy-am335x.c >> @@ -79,6 +79,40 @@ static int am335x_p

Re: dealing with enclosures that don't handle READ_CAPACITY10

2013-08-19 Thread Hannes Reinecke
On 08/12/2013 03:17 PM, Oliver Neukum wrote: > Hi, > > I got a bug report about an enclosure that mishandles READ_CAPACITY10. > I don't want to introduce yet another quirk. So what about basing this > on USB version? > Hmm. You _sure_ it's restricted to USB 3.0? Seem like a generic USB firmware i

Re: octeon-usb and dwc2 in staging are for the same hw

2013-08-19 Thread Sebastian Andrzej Siewior
On 08/17/2013 10:44 PM, Paul Zimmerman wrote: > Hi Greg, all, > > After taking a look at the Octeon driver, it looks like that controller > uses a customized version of the DWC2 core - it has a different DMA > engine than the one provided by the standard hardware. So in fact these > two drivers ar

Re: FUSB200 xhci issue

2013-08-19 Thread Oleksij Rempel
Am 10.08.2013 13:57, schrieb Alan Stern: On Sat, 10 Aug 2013, Oleksij Rempel wrote: usb reset do not affect behaviour of firmware. At least after i remove all attempts to reboot FW from driver. If adapter will got reset signal, FW will be notified about it. Then FW will remove reset flag and wi

Re: [PATCH v2 0/9] USB: phy: phy-nop: Manage RESET GPIO in the driver

2013-08-19 Thread Roger Quadros
Hi Felipe, On 08/16/2013 01:52 PM, Benoit Cousson wrote: > Hi Roger, > > On 15/08/2013 12:18, Roger Quadros wrote: >> Hi, >> >> Modelling the RESET line as a regulator supply wasn't a good idea >> as it abuses the regulator framework and makes adaptation >> code/data more complex. >> >> Instead,

Re: [PATCH] usb: phy: am335x: add wakeup support

2013-08-19 Thread Roger Quadros
Hi Sebastian, On 08/16/2013 08:04 PM, Sebastian Andrzej Siewior wrote: > This is based on George Cherian's patch which added power & wakeup > support to am335x and does no longer apply since I took some if the code > apart in favor of the multi instance support. > This compiles and I boots and lat

Re: [PATCH v3 7/8] ARM: dts: omap4: update omap-control-usb nodes

2013-08-19 Thread Roger Quadros
Hi Benoit, On 08/16/2013 05:30 PM, Benoit Cousson wrote: > Hi Roger, > > Sorry I missed something in the previous revision :-( no problem :) > > On 16/08/2013 15:09, Roger Quadros wrote: >> Split otghs_ctrl and USB2 PHY power down into separate >> omap-control-usb nodes. Get rid of "ti,type" pr

[PATCH] uwb: Staticize local symbols

2013-08-19 Thread Jingoo Han
These local symbols are used only in this file. Fix the following sparse warnings: drivers/uwb/drp-ie.c:30:5: warning: symbol 'uwb_rsv_reason_code' was not declared. Should it be static? drivers/uwb/drp-ie.c:58:5: warning: symbol 'uwb_rsv_companion_reason_code' was not declared. Should it be sta