[PATCH 4/5 v2] usb: dwc2: Avoid suspending if we're in gadget mode

2017-01-03 Thread John Stultz
hn Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Vardan Mikayelyan Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Suggested-by: Chen Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --gi

[PATCH 3/5 v2] usb: dwc2: Force port resume on switching to device mode

2017-01-03 Thread John Stultz
u Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Vardan Mikayelyan Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 7 +++ 1

[PATCH 5/5 v2] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2017-01-03 Thread John Stultz
vger.kernel.org Signed-off-by: Chen Yu [jstultz: Reworked to simplify the patch, and made commit log to be more specific about the issue] Signed-off-by: John Stultz --- v2: * Reworked to adapt around changes that landed in 4.10-rc drivers/usb/dwc2/core.h | 7 ++ drivers/usb/dwc

[PATCH 1/5 v2] usb: dwc2: Avoid sleeping while holding hsotg->lock

2017-01-03 Thread John Stultz
Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Vardan Mikayelyan Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz --- drivers/usb/dwc2/core

[PATCH 0/5 v2] Fixes and workarounds for dwc2 on HiKey board

2017-01-03 Thread John Stultz
Mikayelyan Cc: Douglas Anderson Cc: Chen Yu Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Chen Yu (2): usb: dwc2: Force port resume on switching to device mode usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220 John Stultz

[PATCH 2/5 v2] usb: dwc2: Workaround case where GOTGCTL state is wrong

2017-01-03 Thread John Stultz
Youn Reviewed-by: Vardan Mikayelyan Signed-off-by: John Stultz --- v2: Rework goto logic suggested by Vardan, and add a comment drivers/usb/dwc2/hcd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 911c3b3..b60307a 100644 ---

[RFC][PATCH 4/5 v2] usb: dwc2: Avoid suspending if we're in gadget mode

2016-12-16 Thread John Stultz
hn Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Vardan Mikayelyan Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Suggested-by: Chen Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --gi

[RFC][PATCH 2/5 v2] usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-16 Thread John Stultz
Youn Reviewed-by: Vardan Mikayelyan Signed-off-by: John Stultz --- v2: Rework goto logic suggested by Vardan, and add a comment --- drivers/usb/dwc2/hcd.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 911c3b3..b60307a 100644 ---

[RFC][PATCH 3/5 v2] usb: dwc2: Force port resume on switching to device mode

2016-12-16 Thread John Stultz
u Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Vardan Mikayelyan Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 7 +++ 1

[RFC][PATCH 1/5 v2] usb: dwc2: Avoid sleeping while holding hsotg->lock

2016-12-16 Thread John Stultz
Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Vardan Mikayelyan Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz --- drivers/usb/dwc2/core

[RFC][PATCH 5/5 v2] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2016-12-16 Thread John Stultz
vger.kernel.org Signed-off-by: Chen Yu [jstultz: Reworked to simplify the patch, and made commit log to be more specific about the issue] Signed-off-by: John Stultz --- v2: * Fix build issue reported by kbuildbot * Rework to avoid using new dts entry suggested by RobH * Further tweaks from Chen Yu to

[RFC][PATCH 0/5 v2] Fixes and workarounds for dwc2 on HiKey board

2016-12-16 Thread John Stultz
linux-usb@vger.kernel.org Chen Yu (2): usb: dwc2: Force port resume on switching to device mode usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220 John Stultz (3): usb: dwc2: Avoid sleeping while holding hsotg->lock usb: dwc2: Workaround case where GOTGCTL state

Re: [REGRESSION] dwc2: 5f54c54b0ba8 Add DDMA chain pointers to dwc2_hsotg_ep structure

2016-12-13 Thread John Stultz
On Tue, Dec 13, 2016 at 3:51 PM, John Youn wrote: > On 12/13/2016 3:23 PM, John Stultz wrote: >> I've found trying to boot Linus' HEAD today on HiKey, I'm hitting the >> following WARNINGS/panics, which I bisected down to being introduced >> with 5f54c

Re: [REGRESSION] dwc2: 5f54c54b0ba8 Add DDMA chain pointers to dwc2_hsotg_ep structure

2016-12-13 Thread John Stultz
On Tue, Dec 13, 2016 at 3:51 PM, John Youn wrote: > On 12/13/2016 3:23 PM, John Stultz wrote: >> I've found trying to boot Linus' HEAD today on HiKey, I'm hitting the >> following WARNINGS/panics, which I bisected down to being introduced >> with 5f54c

[REGRESSION?] 05ee799f2021 dwc2: Move gadget settings into core_params

2016-12-13 Thread John Stultz
Hey John, Wanted to let you know I'm seeing a new WARNING with HiKey as of 05ee799f2021 ("dwc2: Move gadget settings into core_params"). It doesn't seem to kill the system, but seems odd since that patch seems to be just moving code around and not changing logic. Any thoughts? thanks -john [

[REGRESSION] dwc2: 5f54c54b0ba8 Add DDMA chain pointers to dwc2_hsotg_ep structure

2016-12-13 Thread John Stultz
I've found trying to boot Linus' HEAD today on HiKey, I'm hitting the following WARNINGS/panics, which I bisected down to being introduced with 5f54c54b0ba8 ("Add DDMA chain pointers to dwc2_hsotg_ep structure"). It seems the issue is calling dma_alloc_coherent() in dwc2_hsotg_ep_enable() isn't sa

Re: [RFC][PATCH 2/5] usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-13 Thread John Stultz
On Tue, Dec 13, 2016 at 4:28 AM, Vardan Mikayelyan wrote: > On 12/13/2016 11:12 AM, John Stultz wrote: >> When removing a USB-A to USB-otg adapter cable, we get a change >> status irq, and then in dwc2_conn_id_status_change, we >> erroniously see the GOTGCTL_CONID_B flag s

Re: [RFC][PATCH 5/5] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2016-12-13 Thread John Stultz
On Tue, Dec 13, 2016 at 5:24 AM, Alan Stern wrote: > On Mon, 12 Dec 2016, John Stultz wrote: > >> From: Chen Yu >> >> The Hi6220's usb controller is limited in that it does not >> support "Split Transactions", so it does not support communicating >

[RFC][PATCH 0/5] Fixes and workarounds for dwc2 on HiKey board

2016-12-12 Thread John Stultz
Anderson Cc: Chen Yu Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Chen Yu (2): usb: dwc2: Force port resume on switching to device mode usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220 John Stultz (3): usb: dwc2: Avoid

[RFC][PATCH 1/5] usb: dwc2: Avoid sleeping while holding hsotg->lock

2016-12-12 Thread John Stultz
Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz --- drivers/usb/dwc2/core.c | 6 +++--- drivers/usb/dwc

[RFC][PATCH 2/5] usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-12 Thread John Stultz
l for me. Feedback would be greatly appreciated! Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Acked-by: John Youn Signed-off-by:

[RFC][PATCH 4/5] usb: dwc2: Avoid suspending if we're in gadget mode

2016-12-12 Thread John Stultz
hn Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Suggested-by: Chen Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc2/hcd.

[RFC][PATCH 3/5] usb: dwc2: Force port resume on switching to device mode

2016-12-12 Thread John Stultz
u Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/driver

[RFC][PATCH 5/5] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2016-12-12 Thread John Stultz
off-by: Chen Yu [jstultz: Reworked to simplify the patch, and made commit log to be more specific about the issue] Signed-off-by: John Stultz --- v2: * Fix build issue reported by kbuildbot * Rework to avoid using new dts entry suggested by RobH * Further tweaks from Chen Yu to try to address comme

Re: [RFC][PATCH] HACK: usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-08 Thread John Stultz
On Thu, Dec 8, 2016 at 11:09 PM, Chen Yu wrote: > On 2016/12/9 7:29, John Youn wrote: >> On 12/8/2016 2:43 PM, John Stultz wrote: >>> On Tue, Dec 6, 2016 at 7:52 PM, John Youn wrote: >>>> On 12/6/2016 5:48 PM, John Stultz wrote: >>>>> This patch wor

[RFC][PATCH] usb: dwc2: Avoid sleeping while holding hsotg->lock

2016-12-08 Thread John Stultz
Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz --- drivers/usb/dwc2/core.c | 6 +++--- drivers/usb/dwc

Re: BUG: scheduling while atomic from dwc2_hsotg_core_init_disconnected

2016-12-08 Thread John Stultz
On Thu, Dec 8, 2016 at 4:31 PM, John Youn wrote: > On 12/8/2016 4:25 PM, John Stultz wrote: >> On Thu, Dec 8, 2016 at 4:17 PM, John Youn wrote: >>> On 12/8/2016 3:12 PM, John Stultz wrote: >>>> Hey John, >>>> In my testing I've come across anothe

Re: BUG: scheduling while atomic from dwc2_hsotg_core_init_disconnected

2016-12-08 Thread John Stultz
On Thu, Dec 8, 2016 at 4:17 PM, John Youn wrote: > On 12/8/2016 3:12 PM, John Stultz wrote: >> Hey John, >> In my testing I've come across another issue in the dwc2 driver. >> >> Basically when plugging in various cables in different orders, I'm >>

Re: BUG: scheduling while atomic from dwc2_hsotg_core_init_disconnected

2016-12-08 Thread John Stultz
On Thu, Dec 8, 2016 at 3:12 PM, John Stultz wrote: > Hey John, > In my testing I've come across another issue in the dwc2 driver. > > Basically when plugging in various cables in different orders, I'm > occasionally seeing the following BUG splat: > > [ 86.21540

BUG: scheduling while atomic from dwc2_hsotg_core_init_disconnected

2016-12-08 Thread John Stultz
Hey John, In my testing I've come across another issue in the dwc2 driver. Basically when plugging in various cables in different orders, I'm occasionally seeing the following BUG splat: [ 86.215403] BUG: scheduling while atomic: kworker/u16:2/53/0x0002 [ 86.219164] usb 1-1: USB disconn

Re: [RFC][PATCH] HACK: usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-08 Thread John Stultz
On Tue, Dec 6, 2016 at 7:52 PM, John Youn wrote: > On 12/6/2016 5:48 PM, John Stultz wrote: >> Hey John, >> Just wanted to send this by you, as it seems something is >> slightly off with the GOTGCTL state when removing a otg adapter >> cable. The following seems t

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Stultz
On Tue, Dec 6, 2016 at 7:54 PM, Chanwoo Choi wrote: > Hi John, > > I give a some guide for extcon API. > This patch uses the deprecated extcon API (extcon_get_cable_state_). > So, I recommend that you better to use following extcon API: > - extcon_get_cable_state_() -> extcon_get_state() > - extc

[RFC][PATCH] HACK: usb: dwc2: Workaround case where GOTGCTL state is wrong

2016-12-06 Thread John Stultz
y appreciated! Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 5 - 1 fi

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Stultz
On Tue, Dec 6, 2016 at 4:35 PM, John Stultz wrote: > On Tue, Dec 6, 2016 at 4:26 PM, John Youn wrote: >> On 12/6/2016 4:05 PM, John Stultz wrote: >>> On Tue, Dec 6, 2016 at 3:17 PM, John Youn wrote: >>>> Also, do you really need this at all? Wasn't your system

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Stultz
On Tue, Dec 6, 2016 at 4:26 PM, John Youn wrote: > On 12/6/2016 4:05 PM, John Stultz wrote: >> On Tue, Dec 6, 2016 at 3:17 PM, John Youn wrote: >>> Also, do you really need this at all? Wasn't your system previously >>> able to detect the ID pin change correctly

Re: [RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Stultz
On Tue, Dec 6, 2016 at 3:17 PM, John Youn wrote: > On 12/6/2016 12:06 AM, John Stultz wrote: >> This patch wires up extcon support to the dwc2 driver >> so that devices that use a modern generic phy driver >> and don't use the usb-phy infrastructure can still >>

[RFC][PATCH 1/3 v2] usb: dwc2: Add extcon support to dwc2 driver

2016-12-06 Thread John Stultz
n Cc: Chen Yu Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz --- v2: * Move extcon logic from generic phy to dwc2 driver, as suggested by Kishon. --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 11 + driver

[RFC][PATCH 3/3 v2] usb: dwc2: Force port resume on switching to device mode

2016-12-06 Thread John Stultz
u Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 8 1 file changed, 8 insertions(+) diff --git a/driver

[RFC][PATCH 0/3 v2] Try to connect HiKey's usb extcon to dwc2 driver

2016-12-06 Thread John Stultz
Yu (1): usb: dwc2: Force port resume on switching to device mode John Stultz (2): usb: dwc2: Add extcon support to dwc2 driver usb: dwc2: Avoid suspending if we're in gadget mode arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 11 + drivers/usb/dwc2/core.h | 16 +++

[RFC][PATCH 2/3 v2] usb: dwc2: Avoid suspending if we're in gadget mode

2016-12-06 Thread John Stultz
hn Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Suggested-by: Chen Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c in

Re: [RFC][PATCH 1/3] phy: phy-hi6220-usb: Wire up extconn support to hikey's phy driver

2016-12-01 Thread John Stultz
On Thu, Dec 1, 2016 at 12:23 AM, Kishon Vijay Abraham I wrote: > Hi, > > On Wednesday 23 November 2016 09:16 AM, John Stultz wrote: >> This wires extconn support to hikey's phy driver, and >> connects it to the usb UDC layer via a usb_phy structure. >> >>

Re: [RFC][PATCH 0/3] Try to connect hikey's usb phy to dwc2 driver

2016-11-30 Thread John Stultz
On Tue, Nov 22, 2016 at 7:46 PM, John Stultz wrote: > After earlier attempts[1] at submitting somewhat hackish fixes > to the dwc2 driver, I realized the core issue seemed to be the > overly simplistic phy driver. > > I've connected the phy-hi6220-usb.c driver to ext

[RFC][PATCH 3/3] usb: dwc2: Avoid suspending if we're in gadget mode

2016-11-22 Thread John Stultz
Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index df5a065..619ccfe 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -4365,6 +4365,9 @@ static int _dwc2_hcd_suspend

[RFC][PATCH 1/3] phy: phy-hi6220-usb: Wire up extconn support to hikey's phy driver

2016-11-22 Thread John Stultz
Cc: Douglas Anderson Cc: Chen Yu Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 11 +++ drivers/phy/Kconfig | 2 + drivers/phy/phy

[RFC][PATCH 0/3] Try to connect hikey's usb phy to dwc2 driver

2016-11-22 Thread John Stultz
nce would be greatly appreciated! thanks -john Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Kishon Vijay Abraham I Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org John Stultz (3): phy: phy-hi6220-

[RFC][PATCH 2/3] HACK: dwc2: force dual use of uphy and phy

2016-11-22 Thread John Stultz
Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz --- drivers/usb/dwc2/platform.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index 8e1728b..8fb2f4d 100644 --- a/drivers/usb/dwc2/

Re: [RFC][PATCH 3/3] usb: dwc2: Make sure we disconnect the gadget state

2016-11-21 Thread John Stultz
On Mon, Nov 21, 2016 at 7:23 PM, John Youn wrote: > On 11/15/2016 1:47 PM, John Stultz wrote: >> I had seen some odd behavior with HiKey's usb-gadget interface >> that I finally seemed to have chased down. Basically every other >> time I pluged in the OTG port,

[RFC][PATCH 1/3] usb: dwc2: Force port resume on switching to device mode

2016-11-15 Thread John Stultz
u Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 8 1 file changed, 8 insertions(+) diff --git a/driver

[RFC][PATCH 2/3] usb: dwc2: Avoid suspending if we're in gadget mode

2016-11-15 Thread John Stultz
hn Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Suggested-by: Chen Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c in

Re: [RFC][PATCH 0/3] DWC2 fixes and hacks to make things work on HiKey

2016-11-15 Thread John Stultz
On Tue, Nov 15, 2016 at 1:47 PM, John Stultz wrote: > I suspect that some of these issues may be due to the phy driver > on hikey being somewhat minimal: > https://git.linaro.org/people/john.stultz/android-dev.git/plain/drivers/phy/phy-hi6220-usb.c?h=dev/hikey-mainline-WIP Whoops. So

[RFC][PATCH 3/3] usb: dwc2: Make sure we disconnect the gadget state

2016-11-15 Thread John Stultz
rtman Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 8c980fd..d2557b7 100644 --- a/drivers/usb/dwc2/hcd.c +++ b/drivers/usb/dwc2/hcd.c @@ -3228,6 +3

[RFC][PATCH 0/3] DWC2 fixes and hacks to make things work on HiKey

2016-11-15 Thread John Stultz
r pointers here would be greatly appreciated. Cc: Wei Xu Cc: Guodong Xu Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Chen Yu Cc: Felipe Balbi Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Chen Yu (1): usb: dwc2: Force port resume on switching to device mo

Re: [RFC][PATCH] usb: dwc2: Make sure we disconnect the gadget state on reset

2016-11-08 Thread John Stultz
On Mon, Oct 31, 2016 at 4:18 AM, Felipe Balbi wrote: > John Stultz writes: >> I had seen some odd behavior with HiKey's usb-gadget interface >> that I finally seemed to have chased down. Basically every other >> time I pluged in the OTG port, the gadget interface wo

Re: [RFC][PATCH] usb: dwc2: Make sure we disconnect the gadget state on reset

2016-10-25 Thread John Stultz
On Tue, Oct 25, 2016 at 2:29 PM, John Youn wrote: > On 10/19/2016 11:00 PM, John Stultz wrote: >> I had seen some odd behavior with HiKey's usb-gadget interface >> that I finally seemed to have chased down. Basically every other >> time I pluged in the OTG port,

[RFC][PATCH] usb: dwc2: Make sure we disconnect the gadget state on reset

2016-10-19 Thread John Stultz
Xu Cc: Chen Yu Cc: Amit Pundir Cc: Rob Herring Cc: Mark Rutland Cc: John Youn Cc: Douglas Anderson Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz --- drivers/usb/dwc2/gadget.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/

[RFC][PATCH 1/2 v2] usb: dwc2: Force port resume on switching to device mode

2016-10-19 Thread John Stultz
u Cc: Amit Pundir Cc: Rob Herring Cc: John Youn Cc: Douglas Anderson Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb

[RFC][PATCH 2/2 v2] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2016-10-19 Thread John Stultz
nd made commit log to be more specific about the issue] Signed-off-by: John Stultz --- v2: * Fix build issue reported by kbuildbot * Rework to avoid using new dts entry suggested by RobH * Further tweaks from Chen Yu to try to address comments from John Youn * Further simplified logic --- drivers/

[RFC][PATCH 0/2 v2] dwc2 fixes for HiKey

2016-10-19 Thread John Stultz
I wanted to send out two patches we're using on the dwc2 driver in order to make HiKey function. The first is seemingly just a bug fix we ran into when changing modes while the bus was auto-suspended. The second is a little more interesting as it works around a limitation of the the device in tha

Re: [RFC][PATCH 2/2] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2016-10-14 Thread John Stultz
On Fri, Oct 14, 2016 at 8:00 AM, Rob Herring wrote: > On Thu, Oct 13, 2016 at 6:29 PM, John Stultz wrote: >> From: Chen Yu >> >> The Hi6220's usb controller is limited in that it does not >> automatically autonegotiate the usb speed. Thus it requires a >> q

[RFC][PATCH 0/2] dwc2 fixes for HiKey

2016-10-13 Thread John Stultz
I wanted to send out two patches we're using on the dwc2 driver in order to make HiKey function. The first is seemingly just a bug fix we ran into when changing modes while the bus was auto-suspended. The second is a little more interesting as it works around a limitation of the the device to neg

Re: [RFC][PATCH 2/2] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2016-10-13 Thread John Stultz
On Thu, Oct 13, 2016 at 4:29 PM, John Stultz wrote: > From: Chen Yu > > The Hi6220's usb controller is limited in that it does not > automatically autonegotiate the usb speed. Thus it requires a > quirk so that we can manually negotiate the best usb speed for > the attac

[RFC][PATCH 1/2] usb: dwc2: Force port resume on switching to device mode

2016-10-13 Thread John Stultz
u Cc: Amit Pundir Cc: Rob Herring Cc: Mark Rutland Cc: John Youn Cc: Douglas Anderson Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu Signed-off-by: John Stultz --- drivers/usb/dwc2/hcd.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/dwc2/hc

[RFC][PATCH 2/2] usb: dwc2: Add a quirk to allow speed negotiation for Hisilicon Hi6220

2016-10-13 Thread John Stultz
Mark Rutland Cc: John Youn Cc: Douglas Anderson Cc: Greg Kroah-Hartman Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu Signed-off-by: John Stultz --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 1 + drivers/usb/dwc2/core.h | 7 +++ drivers/usb/dwc2/hcd.c

Re: [PATCH 2/2] usb: gadget: f_fs: stop sleeping in ffs_func_eps_disable

2016-10-03 Thread John Stultz
ohn, if you could test this version as well, that would be > swell. for both patches: Tested-by: John Stultz Thanks so much for these! -john -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html

Re: BUG: scheduling while atomic in f_fs when gadget remove driver

2016-10-03 Thread John Stultz
On Mon, Oct 3, 2016 at 1:16 PM, John Stultz wrote: > On Mon, Oct 3, 2016 at 1:07 PM, Michal Nazarewicz wrote: >> On Mon, Oct 03 2016, John Stultz wrote: >>> Can you resend it using git-send-email or in some way other then >>> embedding it inline here? Maybe just poin

Re: BUG: scheduling while atomic in f_fs when gadget remove driver

2016-10-03 Thread John Stultz
On Mon, Oct 3, 2016 at 1:07 PM, Michal Nazarewicz wrote: > On Mon, Oct 03 2016, John Stultz wrote: >> On Wed, Sep 28, 2016 at 2:38 PM, Michal Nazarewicz wrote: >>> On Wed, Sep 28 2016, Michal Nazarewicz wrote: >>>> With that done, the only thing which needs a mut

Re: BUG: scheduling while atomic in f_fs when gadget remove driver

2016-10-03 Thread John Stultz
On Wed, Sep 28, 2016 at 2:38 PM, Michal Nazarewicz wrote: > On Wed, Sep 28 2016, Michal Nazarewicz wrote: >> With that done, the only thing which needs a mutex is >> epfile->read_buffer. > > Perhaps this would do: > > >8 -- - > From

Re: [PATCH 00/21] Support qcom's HSIC USB and rewrite USB2 HS phy support

2016-07-05 Thread John Stultz
On Tue, Jul 5, 2016 at 12:22 PM, Stephen Boyd wrote: > Quoting John Stultz (2016-07-01 23:03:38) >> On Tue, Jun 28, 2016 at 1:34 AM, Stephen Boyd >> wrote: >> > Quoting John Stultz (2016-06-27 20:09:30) >> >> >> >> I haven't yet been able t

Re: [PATCH 00/21] Support qcom's HSIC USB and rewrite USB2 HS phy support

2016-07-01 Thread John Stultz
On Tue, Jun 28, 2016 at 1:34 AM, Stephen Boyd wrote: > Quoting John Stultz (2016-06-27 20:09:30) >> >> I haven't yet been able to test with this, as I need some other fixes >> it seems too to deal with some of the iommu changes in my flo-WIP tree >> (it can't

Re: [PATCH 00/21] Support qcom's HSIC USB and rewrite USB2 HS phy support

2016-06-27 Thread John Stultz
On Sun, Jun 26, 2016 at 12:28 AM, Stephen Boyd wrote: > The state of USB ChipIdea support on Qualcomm's platforms is not great. > The DT description of these devices requires up to three different nodes > for what amounts to be the same hardware block, when there should really > only be one. Furth

[PATCH] asix: Fix offset calculation in asix_rx_fixup() causing slow transmissions

2016-05-16 Thread John Stultz
Cc: Mark Craske Cc: Emil Goode Cc: "David S. Miller" Cc: YongQin Liu Cc: Guodong Xu Cc: Ivan Vecera Cc: linux-usb@vger.kernel.org Cc: net...@vger.kernel.org Cc: stable #4.4+ Reported-by: Yongqin Liu Signed-off-by: John Stultz --- drivers/net/usb/asix_common.c | 2 +- 1 file

Re: [REGRESSION] asix: Lots of asix_rx_fixup() errors and slow transmissions

2016-05-16 Thread John Stultz
On Wed, May 11, 2016 at 3:00 PM, Dean Jenkins wrote: > > Your observations are consistent with missing URBs from the USB host > controller. > > Here is a summary of what I think is happening in your case: > > Good case: > URB #1: 1514 octets of 1514 Ethernet frame (A) > URB #2: 1514 octets of 1514

Re: [REGRESSION] asix: Lots of asix_rx_fixup() errors and slow transmissions

2016-05-06 Thread John Stultz
On Tue, May 3, 2016 at 2:16 PM, Dean Jenkins wrote: > > [ 239.027993] asix 1-1.1:1.0 eth0: asix_rx_fixup() Data Header > synchronisation was lost, remaining 988 > > This error message consistently shows the remaining value to be 988, at > least for the 3 examples provided by John. This does not s

Re: [REGRESSION] asix: Lots of asix_rx_fixup() errors and slow transmissions

2016-05-06 Thread John Stultz
On Tue, May 3, 2016 at 2:16 PM, Dean Jenkins wrote: > A good test would be to run "ping -c 1 -s $packet_length $ip_address" inside > a script which has a loop with an increasing payload length $packet_length > with a small delay between ping calls. This will show whether particular > packet sizes

Re: [REGRESSION] asix: Lots of asix_rx_fixup() errors and slow transmissions

2016-05-06 Thread John Stultz
On Fri, May 6, 2016 at 8:00 AM, Dean Jenkins wrote: > My conclusion is that your USB to Ethernet Adaptor is not running at high > speed (480Mbps) mode which is causing a partial loss (corruption) of > Ethernet frames across the USB link. A USB Protocol Analyser or software > tool usbmon could be u

Re: [REGRESSION] asix: Lots of asix_rx_fixup() errors and slow transmissions

2016-05-06 Thread John Stultz
On Thu, May 5, 2016 at 1:11 AM, Dean Jenkins wrote: > On 05/05/16 00:45, John Stultz wrote: >> >> Just as a sample point, I have managed to reproduce exactly this issue >> on an x86_64 system by simply scp'ing a large file. > > Please tell us the x86_64 kernel

Re: [REGRESSION] asix: Lots of asix_rx_fixup() errors and slow transmissions

2016-05-04 Thread John Stultz
On Tue, May 3, 2016 at 3:54 AM, Dean Jenkins wrote: > On 03/05/16 11:04, Guodong Xu wrote: >> >> did you test on ARM 64-bit system or ARM 32-bit? I ask because HiKey >> is an ARM 64-bit system. I suggest we should be careful on that. I saw >> similar issues when transferring to a 64-bit system in

Re: [REGRESSION] asix: Lots of asix_rx_fixup() errors and slow transmissions

2016-05-03 Thread John Stultz
On Tue, May 3, 2016 at 7:42 AM, David B. Robins wrote: > On 2016-05-03 00:55, John Stultz wrote: >> >> Looking through the commits since the v4.1 kernel where we didn't see >> this, I narrowed the regression down, and reverting the following two >> co

[REGRESSION] asix: Lots of asix_rx_fixup() errors and slow transmissions

2016-05-02 Thread John Stultz
In testing with HiKey, we found that since commit 3f30b158eba5c60 (asix: On RX avoid creating bad Ethernet frames), we're seeing lots of noise during network transfers: [ 239.027993] asix 1-1.1:1.0 eth0: asix_rx_fixup() Data Header synchronisation was lost, remaining 988 [ 239.037310] asix 1-1.1

[PATCH] functionfs: Avoid aio locking problem

2015-06-22 Thread John Stultz
-by: John Stultz --- drivers/usb/gadget/function/f_fs.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/gadget/function/f_fs.c b/drivers/usb/gadget/function/f_fs.c index 3507f88..d2434c9 100644 --- a/drivers/usb/gadget/function/f_fs.c +++ b/drivers/usb/gadget

Re: Locking issues w/ functionfs gadget and aio?

2015-06-22 Thread John Stultz
On Sat, Jun 20, 2015 at 10:24 PM, Al Viro wrote: > On Fri, Jun 12, 2015 at 05:51:12PM -0700, John Stultz wrote: > >> I'm not super sure what the right fix is, but if do something like the >> following (sorry, whitespace corrupted via copy/paste), I don't seem >>

Re: Locking issues w/ functionfs gadget and aio?

2015-06-12 Thread John Stultz
On Mon, Jun 8, 2015 at 6:14 PM, John Stultz wrote: > After setting up functionfs for adb w/ 4.1-rc7, I noticed some flakey > behavior. > I enabled some lock debugging and got the following: > > [ 91.648093] read strings > [ 91.650264] g_ffs gadget: g_ffs ready > [

Locking issues w/ functionfs gadget and aio?

2015-06-08 Thread John Stultz
After setting up functionfs for adb w/ 4.1-rc7, I noticed some flakey behavior. I enabled some lock debugging and got the following: [ 91.648093] read strings [ 91.650264] g_ffs gadget: g_ffs ready [ 91.652551] ci_hdrc ci_hdrc.0: CI_HDRC_CONTROLLER_RESET_EVENT received [ 96.068693] BUG: sp

Re: [PATCH] [RFC] usb: gadget: composite: Allow idVendor and other module_params to be writable

2013-02-21 Thread John Stultz
On 02/21/2013 02:52 PM, Michal Nazarewicz wrote: On Thu, Feb 21 2013, John Stultz wrote: In many cases, documentation around composite drivers suggest setting the idVendor and other module params as follows: $ insmod g_ffs.ko idVendor= iSerialNumber= However, this won't work if the driv

[PATCH] [RFC] usb: gadget: composite: Allow idVendor and other module_params to be writable

2013-02-21 Thread John Stultz
l.org Signed-off-by: John Stultz --- include/linux/usb/composite.h | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/include/linux/usb/composite.h b/include/linux/usb/composite.h index b09c37e..22b1b02 100644 --- a/include/linux/usb/composite.h +++ b/include/linu

<    1   2