Re: [PATCH] usb: Kconfig: make USB_ULPI_BUS select USB_COMMON

2016-09-13 Thread Arnd Bergmann
On Tuesday, September 13, 2016 9:48:55 AM CEST Peter Chen wrote: > On Mon, Sep 12, 2016 at 05:36:23PM +0200, Arnd Bergmann wrote: > > Moving the CONFIG_USB_ULPI_BUS option to the top-level Kconfig file > > means that we can enable it without any of the other USB support, > > leading to a build erro

Re: [PATCH v4 22/22] phy: Add support for Qualcomm's USB HS phy

2016-09-13 Thread Peter Chen
On Wed, Sep 07, 2016 at 02:35:19PM -0700, Stephen Boyd wrote: > The high-speed phy on qcom SoCs is controlled via the ULPI > viewport. > Hi Stephen, I am a little puzzled how this driver co-work with chipidea driver. According to nxp IC guys, the ULPI PHY's clock needs to be enabled before access

Re: [PATCH] usb: Kconfig: make USB_ULPI_BUS select USB_COMMON

2016-09-13 Thread Peter Chen
On Tue, Sep 13, 2016 at 09:04:08AM +0200, Arnd Bergmann wrote: > On Tuesday, September 13, 2016 9:48:55 AM CEST Peter Chen wrote: > > On Mon, Sep 12, 2016 at 05:36:23PM +0200, Arnd Bergmann wrote: > > > Moving the CONFIG_USB_ULPI_BUS option to the top-level Kconfig file > > > means that we can enab

Re: [PATCH] usb: Kconfig: make USB_ULPI_BUS select USB_COMMON

2016-09-13 Thread Arnd Bergmann
On Tuesday, September 13, 2016 3:19:42 PM CEST Peter Chen wrote: > > I just see below Kconfig entry at the same Kconfig > (drivers/usb/Kconfig), and forget your changes. > > config USB_LED_TRIG > bool "USB LED Triggers" > depends on LEDS_CLASS && USB_COMMON && LEDS_TRIGGERS >

Re: [PATCH v16 0/4] Introduce usb charger framework to deal with the usb gadget power negotation

2016-09-13 Thread NeilBrown
On Mon, Sep 12 2016, Mark Brown wrote: > [ Unknown signature status ] > On Mon, Sep 12, 2016 at 03:27:18PM +0200, NeilBrown wrote: >> On Mon, Sep 12 2016, Mark Brown wrote: > >> > It's no worse than any other board file situation - if someone has that >> > problem they get to fix it. > >> My point

Re: [PATCH 1/3] usb: gadgetfs: introduce feature control mechanism

2016-09-13 Thread Binyamin Sharet
On 09/12/2016 04:11 PM, Alan Stern wrote: > On Mon, 12 Sep 2016, Binyamin Sharet (bsharet) wrote: > >>> On 8 Sep 2016, at 23:24, Alan Stern wrote: >>> >>> On Thu, 8 Sep 2016, Binyamin Sharet (bsharet) wrote: >>> > On 8 Sep 2016, at 22:20, Alan Stern wrote: > > On Thu, 8 Sep 2016, Biny

[PATCH v4] usb: core: setup dma_pfn_offset for USB devices and, interfaces

2016-09-13 Thread Roger Quadros
If dma_pfn_offset is not inherited correctly from the host controller, it might result in sub-optimal configuration as bounce buffer limit might be set to less than optimal level. Consider the mass storage device case. USB storage driver creates a scsi host for the mass storage interface in driver

Re: [PATCH] usb: Kconfig: make USB_ULPI_BUS select USB_COMMON

2016-09-13 Thread Peter Chen
On Tue, Sep 13, 2016 at 09:36:39AM +0200, Arnd Bergmann wrote: > On Tuesday, September 13, 2016 3:19:42 PM CEST Peter Chen wrote: > > > > I just see below Kconfig entry at the same Kconfig > > (drivers/usb/Kconfig), and forget your changes. > > > > config USB_LED_TRIG > > bool "USB LED Tr

Re: [PATCH] usb: Kconfig: make USB_ULPI_BUS select USB_COMMON

2016-09-13 Thread Arnd Bergmann
On Tuesday, September 13, 2016 4:50:05 PM CEST Peter Chen wrote: > On Tue, Sep 13, 2016 at 09:36:39AM +0200, Arnd Bergmann wrote: > > On Tuesday, September 13, 2016 3:19:42 PM CEST Peter Chen wrote: > > > > > > I just see below Kconfig entry at the same Kconfig > > > (drivers/usb/Kconfig), and for

Re: [PATCH v4] usb: core: setup dma_pfn_offset for USB devices and, interfaces

2016-09-13 Thread Arnd Bergmann
On Tuesday, September 13, 2016 11:16:03 AM CEST Roger Quadros wrote: > If dma_pfn_offset is not inherited correctly from the host controller, > it might result in sub-optimal configuration as bounce > buffer limit might be set to less than optimal level. > > Consider the mass storage device case.

Re: [RESEND PATCH v7 0/4] the fix for the USB HOST1 at rk3288 platform

2016-09-13 Thread Heiko Stuebner
Hi Randy, could you check if the other host-only dwc2 are also affected by this (rk3188, rk3036) please? Because they also seem to act up in some strange way sometimes. Thanks Heiko Am Samstag, 10. September 2016, 02:59:36 CEST schrieb Randy Li: > At this stage it is the only "full features"

Re: [RESEND PATCH v7 0/4] the fix for the USB HOST1 at rk3288 platform

2016-09-13 Thread ayaka
On 09/13/2016 07:06 PM, Heiko Stuebner wrote: Hi Randy, could you check if the other host-only dwc2 are also affected by this (rk3188, rk3036) please? Because they also seem to act up in some strange way But I don't have those board currently. I would arrange them anyway. Btw, I would send a

Re: Question about suspend/resume clock handling in dwc3-of-simple.c

2016-09-13 Thread Guenter Roeck
On 09/12/2016 10:35 PM, Felipe Balbi wrote: Hi, Guenter Roeck writes: Should it be clk_disable_unprepare(), or maybe something like the following if (!pm_runtime_status_suspended(dev)) clk_disable_unprepare(); else clk_unprepare(); I'm not su

Re: [PATCH v4] usb: core: setup dma_pfn_offset for USB devices and, interfaces

2016-09-13 Thread Alan Stern
On Tue, 13 Sep 2016, Arnd Bergmann wrote: > On Tuesday, September 13, 2016 11:16:03 AM CEST Roger Quadros wrote: > > If dma_pfn_offset is not inherited correctly from the host controller, > > it might result in sub-optimal configuration as bounce > > buffer limit might be set to less than optimal

Re: Mapping USB-ports "by slot" rather than by "usb attributes"

2016-09-13 Thread Ajay Garg
A. (sorry for my stupid realisation-originated-question), for the same serial-cable types with identical "idVendor" and "idProduct", are they guaranteed to have unique serial-numbers? We have the Prolific-PL2303-Serial-To-USB-converters with ID 067b:2303. Right now I have two of these piec

Re: Mapping USB-ports "by slot" rather than by "usb attributes"

2016-09-13 Thread Greg KH
On Tue, Sep 13, 2016 at 07:20:01PM +0530, Ajay Garg wrote: > A. (sorry for my stupid realisation-originated-question), for > the same serial-cable types with identical "idVendor" and "idProduct", > are they guaranteed to have unique serial-numbers? No, there is no such USB requirement. Od

Re: Question about suspend/resume clock handling in dwc3-of-simple.c

2016-09-13 Thread Felipe Balbi
Hi, Guenter Roeck writes: > On 09/12/2016 10:35 PM, Felipe Balbi wrote: >> >> Hi, >> >> Guenter Roeck writes: > Should it be clk_disable_unprepare(), or maybe something like the > following > > if (!pm_runtime_status_suspended(dev)) > clk_disable_unprepare(); >>>

Re: [PATCHv2] usb: musb: Fix unbalanced platform_disable

2016-09-13 Thread Bin Liu
Hi, On Mon, Sep 12, 2016 at 08:18:05PM -0700, Tony Lindgren wrote: > * Bin Liu [160912 11:36]: > > On Mon, Sep 12, 2016 at 08:05:30PM +0200, Andreas Kemnade wrote: > > > Hmm, then the question is: Couldn't the X_musb_disable simply be called > > > from X_probe if needed to be an the safe side? >

Re: [PATCHv2] usb: musb: Fix unbalanced platform_disable

2016-09-13 Thread Bin Liu
On Tue, Sep 13, 2016 at 05:32:23PM +0300, Laurent Pinchart wrote: > Hi Bin, > > On Tuesday 13 Sep 2016 09:14:48 Bin Liu wrote: > > On Mon, Sep 12, 2016 at 08:18:05PM -0700, Tony Lindgren wrote: > > > * Bin Liu [160912 11:36]: > > > > On Mon, Sep 12, 2016 at 08:05:30PM +0200, Andreas Kemnade wrote

Re: [PATCHv2] usb: musb: Fix unbalanced platform_disable

2016-09-13 Thread Tony Lindgren
* Bin Liu [160913 07:40]: > On Tue, Sep 13, 2016 at 05:32:23PM +0300, Laurent Pinchart wrote: > > Hi Bin, > > > > On Tuesday 13 Sep 2016 09:14:48 Bin Liu wrote: > > > On Mon, Sep 12, 2016 at 08:18:05PM -0700, Tony Lindgren wrote: > > > > * Bin Liu [160912 11:36]: > > > > > On Mon, Sep 12, 2016 a

[PATCH 2/2] cdc-acm: cleaning up debug in data submission path

2016-09-13 Thread Oliver Neukum
Further cleanup making the debug messages more precise, useful and removing mere trace points. Signed-off-by: Oliver Neukum --- drivers/usb/class/cdc-acm.c | 16 ++-- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-ac

[PATCH 1/2] cdc-acm: cleanup debugging in submission path

2016-09-13 Thread Oliver Neukum
Actually make it retutn useful information. Signed-off-by: Oliver Neukum --- drivers/usb/class/cdc-acm.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/usb/class/cdc-acm.c b/drivers/usb/class/cdc-acm.c index fef0d8f..faab151 100644 --- a/drivers/usb/class/cdc

Re: [RESEND PATCH v7 0/4] the fix for the USB HOST1 at rk3288 platform

2016-09-13 Thread Heiko Stuebner
Am Dienstag, 13. September 2016, 19:26:03 CEST schrieb ayaka: > On 09/13/2016 07:06 PM, Heiko Stuebner wrote: > > Hi Randy, > > > > could you check if the other host-only dwc2 are also affected by this > > (rk3188, rk3036) please? Because they also seem to act up in some strange > > way > But I do

Re: [PATCHv2] usb: musb: Fix unbalanced platform_disable

2016-09-13 Thread Laurent Pinchart
Hi Bin, On Tuesday 13 Sep 2016 09:14:48 Bin Liu wrote: > On Mon, Sep 12, 2016 at 08:18:05PM -0700, Tony Lindgren wrote: > > * Bin Liu [160912 11:36]: > > > On Mon, Sep 12, 2016 at 08:05:30PM +0200, Andreas Kemnade wrote: > > > > Hmm, then the question is: Couldn't the X_musb_disable simply be > >

Re: Mapping USB-ports "by slot" rather than by "usb attributes"

2016-09-13 Thread Ajay Garg
Thanks Greg for the reply. Following are some outputs for a cable :: ls -lrth /dev/serial/by-path/ total 0 lrwxrwxrwx 1 root root 13 Sep 13 14:43 platform-3f98.usb-usb-0:1.4:1.0-port0 -> ../../ttyUSB0 ls -lrth /dev/serial/by-id/ total 0 lrwxrwxrwx 1 root root 13 Sep 13 14:43 usb-Prolific_T

Re: [PATCH 4/7] phy: meson: add USB2 PHY support for Meson8b and GXBB

2016-09-13 Thread Philipp Zabel
Hi Martin, Am Freitag, den 09.09.2016, 22:36 +0200 schrieb Martin Blumenstingl: > On Fri, Sep 9, 2016 at 5:33 PM, Kevin Hilman wrote: > > Martin Blumenstingl writes: > > > >> On Thu, Sep 8, 2016 at 10:53 PM, Ben Dooks > >> wrote: > >>> On 08/09/16 21:42, Kevin Hilman wrote: > > Ben D

Re: Mapping USB-ports "by slot" rather than by "usb attributes"

2016-09-13 Thread Greg KH
On Tue, Sep 13, 2016 at 08:45:14PM +0530, Ajay Garg wrote: > Thanks Greg for the reply. > > > > Following are some outputs for a cable :: > > ls -lrth /dev/serial/by-path/ > total 0 > lrwxrwxrwx 1 root root 13 Sep 13 14:43 > platform-3f98.usb-usb-0:1.4:1.0-port0 -> ../../ttyUSB0 > > ls -lr

[PATCH] dmaengine: cppi41: Ignore EINPROGRESS for PM runtime

2016-09-13 Thread Tony Lindgren
We can occasionally get -EINPROGRESS for pm_runtime_get. In that case we can just continue as we're queueing transfers anyways when pm_runtime_active is not set. Fixes: fdea2d09b997 ("dmaengine: cppi41: Add basic PM runtime support") Signed-off-by: Tony Lindgren --- drivers/dma/cppi41.c | 2 +-

Re: ULPI phy issue with

2016-09-13 Thread Fabien Lahoudere
Hi Peter, First thank you for your help. On 13/09/16 08:52, Peter Chen wrote: On Mon, Sep 12, 2016 at 12:06:10PM +0200, Fabien Lahoudere wrote: On 12/09/16 11:46, Peter Chen wrote: On Mon, Sep 12, 2016 at 11:13:01AM +0200, Fabien Lahoudere wrote: Hi, Yes, please send the patch and tell m

Re: [PATCH 4/7] phy: meson: add USB2 PHY support for Meson8b and GXBB

2016-09-13 Thread Martin Blumenstingl
Hi Philipp, On Tue, Sep 13, 2016 at 5:28 PM, Philipp Zabel wrote: > Hi Martin, > > Am Freitag, den 09.09.2016, 22:36 +0200 schrieb Martin Blumenstingl: >> On Fri, Sep 9, 2016 at 5:33 PM, Kevin Hilman wrote: >> > Martin Blumenstingl writes: >> > >> >> On Thu, Sep 8, 2016 at 10:53 PM, Ben Dooks

Re: [PATCH 1/2] usb: dwc3: Add ref clock period setting

2016-09-13 Thread John Youn
On 9/12/2016 7:09 AM, Rob Herring wrote: > On Thu, Sep 01, 2016 at 02:32:30PM -0700, John Youn wrote: >> From: Thinh Nguyen >> >> Added ref_clk_per for writing to GUCTL.RefClkPer which >> sets the period of ref_clk in nano second. >> >> Signed-off-by: Thinh Nguyen >> Signed-off-by: John Youn >>

Re: [PATCH 2/2] usb: dwc3: Added a property to set GFLADJ register

2016-09-13 Thread John Youn
On 9/12/2016 8:30 AM, Rob Herring wrote: > On Thu, Sep 01, 2016 at 02:32:33PM -0700, John Youn wrote: >> From: Thinh Nguyen >> >> Added gfladj variable to control the core behavior with respect to >> SOF, ITP, and frame timer functionality. >> >> Currently there is dwc->fladj that holds a single f

Re: [PATCH] usb: cleanup with list_first_entry_or_null()

2016-09-13 Thread John Youn
On 9/12/2016 10:52 PM, Felipe Balbi wrote: > > Hi Masahiro, > > Masahiro Yamada writes: >> The combo of list_empty() check and return list_first_entry() >> can be replaced with list_first_entry_or_null(). >> >> Signed-off-by: Masahiro Yamada >> --- > > Care to split this into two patches (one

Re: [Bug] System reboots instead of shutting down if xhci is enabled in BIOS and USB hub is connected

2016-09-13 Thread Hasan Mahmood
Hi Mathias, That worked, although I had to specify the quirks via a kernel boot parameter. Thanks for your help! Hasan. On Mon, Sep 12, 2016 at 9:40 AM, Mathias Nyman wrote: > On 05.09.2016 19:46, Hasan Mahmood wrote: >> >> System reboots instead of shutting down if xhci is enabled in BIOS and

Re: [PATCH] usb: ohci: Allow ohci on omap5 also

2016-09-13 Thread Tony Lindgren
* Alan Stern [160910 19:27]: > On Fri, 9 Sep 2016, Alan Stern wrote: > > > On Fri, 9 Sep 2016, Tony Lindgren wrote: > > > > > * Alan Stern [160909 13:41]: > > > > On Fri, 9 Sep 2016, Tony Lindgren wrote: > > > > > > > > > * Alan Stern [160909 12:47]: > > > > > > You know, as far as I can tell

[PATCH] usb: chipidea: Properly mark little endian descriptors

2016-09-13 Thread Stephen Boyd
The DMA descriptors are little endian, and we do a pretty good job of handling them with the proper le32_to_cpu() markings, but we don't actually mark them as __le32. This means checkers like sparse can't easily find new bugs. Let's mark the members of structures properly and fix the few places whe

[RFC/PATCH] usb: chipidea: Emulate OTGSC interrupt enable path

2016-09-13 Thread Stephen Boyd
In the case of an extcon-usb-gpio device being used with the chipidea driver we'll sometimes miss the BSVIS event in the OTGSC register. Consider the case where we don't have a cable attached and the id pin is indicating "host" mode. When we plug in the usb cable for "device" mode a gpio goes high

Re: [PATCH 4/7] phy: meson: add USB2 PHY support for Meson8b and GXBB

2016-09-13 Thread Kevin Hilman
Martin Blumenstingl writes: > On Tue, Sep 13, 2016 at 5:28 PM, Philipp Zabel wrote: [...] >>> I added Philipp and Hans to this thread - maybe they can comment on this. >>> To sum it up, our problem is: >>> - there are two separate USB PHYs on Meson GXBB >>> - both are sharing the same reset li

[RFC/PATCH] usb: misc: Add a driver for TC7USB40MU

2016-09-13 Thread Stephen Boyd
On the db410c 96boards platform we have a TC7USB40MU[1] on the board to mux the D+/D- lines from the SoC between a micro usb "device" port and a USB hub for "host" roles. Upon a role switch, we need to change this mux to forward the D+/D- lines to either the port or the hub. Therefore, introduce a

[PATCH 1/1] usb: Kconfig: using select for USB_COMMON dependency

2016-09-13 Thread Peter Chen
According to (badf6d47f8a9 "usb: common: rework CONFIG_USB_COMMON logic") we should select USB_COMMON at Kconfig when usb common stuffs are needed, but some of Kconfig enties have not followed it, update them. Cc: Arnd Bergmann Cc: Felipe Balbi Cc: Heikki Krogerus Signed-off-by: Peter Chen ---

Re: [PATCH v4 22/22] phy: Add support for Qualcomm's USB HS phy

2016-09-13 Thread Peter Chen
On Tue, Sep 13, 2016 at 01:41:44PM -0700, Stephen Boyd wrote: > Quoting Peter Chen (2016-09-13 00:03:58) > > On Wed, Sep 07, 2016 at 02:35:19PM -0700, Stephen Boyd wrote: > > > The high-speed phy on qcom SoCs is controlled via the ULPI > > > viewport. > > > > > > > Hi Stephen, I am a little puzzl

Re: [PATCH] usb: chipidea: Properly mark little endian descriptors

2016-09-13 Thread Peter Chen
On Tue, Sep 13, 2016 at 04:06:31PM -0700, Stephen Boyd wrote: > The DMA descriptors are little endian, and we do a pretty good > job of handling them with the proper le32_to_cpu() markings, but > we don't actually mark them as __le32. This means checkers like > sparse can't easily find new bugs. Le

Re: [PATCH] usb: chipidea: Properly mark little endian descriptors

2016-09-13 Thread Peter Chen
On Wed, Sep 14, 2016 at 10:37:40AM +0800, Peter Chen wrote: > On Tue, Sep 13, 2016 at 04:06:31PM -0700, Stephen Boyd wrote: > > The DMA descriptors are little endian, and we do a pretty good > > job of handling them with the proper le32_to_cpu() markings, but > > we don't actually mark them as __le

Re: [RFC/PATCH] usb: misc: Add a driver for TC7USB40MU

2016-09-13 Thread Peter Chen
On Tue, Sep 13, 2016 at 06:42:46PM -0700, Stephen Boyd wrote: > On the db410c 96boards platform we have a TC7USB40MU[1] on the > board to mux the D+/D- lines from the SoC between a micro usb > "device" port and a USB hub for "host" roles. Upon a role switch, > we need to change this mux to forward

Re: [PATCH v4 22/22] phy: Add support for Qualcomm's USB HS phy

2016-09-13 Thread Kishon Vijay Abraham I
On Saturday 10 September 2016 05:48 PM, Kishon Vijay Abraham I wrote: > > On Wed, Sep 07, 2016 at 02:35:19PM -0700, Stephen Boyd wrote: >> The high-speed phy on qcom SoCs is controlled via the ULPI >> viewport. >> >> Cc: Kishon Vijay Abraham I >> Cc: >> Signed-off-by: Stephen Boyd > > merged

[PATCH/REBASED] usb: chipidea: Properly mark little endian descriptors

2016-09-13 Thread Stephen Boyd
The DMA descriptors are little endian, and we do a pretty good job of handling them with the proper le32_to_cpu() markings, but we don't actually mark them as __le32. This means checkers like sparse can't easily find new bugs. Let's mark the members of structures properly and fix the few places whe

Re: [PATCH/REBASED] usb: chipidea: Properly mark little endian descriptors

2016-09-13 Thread Peter Chen
On Tue, Sep 13, 2016 at 10:53:02PM -0700, Stephen Boyd wrote: > The DMA descriptors are little endian, and we do a pretty good > job of handling them with the proper le32_to_cpu() markings, but > we don't actually mark them as __le32. This means checkers like > sparse can't easily find new bugs. Le