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

2013-02-21 Thread John Stultz
: Felipe Balbi ba...@ti.com Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz john.stu...@linaro.org --- include/linux/usb/composite.h | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/include/linux/usb

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=ID iSerialNumber=string However, this won't work

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:

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 v...@zeniv.linux.org.uk 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 to run

[PATCH] functionfs: Avoid aio locking problem

2015-06-22 Thread John Stultz
@vger.kernel.org Signed-off-by: John Stultz john.stu...@linaro.org --- 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

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 john.stu...@linaro.org 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 [ 91.652551

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

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) >

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

2016-05-16 Thread John Stultz
an Vecera <ivec...@redhat.com> Cc: linux-usb@vger.kernel.org Cc: net...@vger.kernel.org Cc: stable <sta...@vger.kernel.org> #4.4+ Reported-by: Yongqin Liu <yongqin@linaro.org> Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/net/usb/asix_common.c | 2 +- 1 f

[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

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 <li...@davidrobins.net> 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 tw

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 <dean_jenk...@mentor.com> 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

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

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

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

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

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 <stephen.b...@linaro.org> wrote: > Quoting John Stultz (2016-07-01 23:03:38) >> On Tue, Jun 28, 2016 at 1:34 AM, Stephen Boyd <stephen.b...@linaro.org> >> wrote: >> > Quoting John Stultz (2016-06-27 20:09:30)

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

2016-07-02 Thread John Stultz
On Tue, Jun 28, 2016 at 1:34 AM, Stephen Boyd <stephen.b...@linaro.org> 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

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

2017-02-13 Thread John Stultz
t; Cc: Douglas Anderson <diand...@chromium.org> Cc: Chen Yu <cheny...@huawei.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz <john.stu...@linaro.org> --- driver

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

2017-01-16 Thread John Stultz
On Mon, Jan 16, 2017 at 2:29 AM, Felipe Balbi <felipe.ba...@linux.intel.com> wrote: > > Hi, > > John Stultz <john.stu...@linaro.org> writes: >> I just wanted to re-send my current queue of patches for dwc2 >> controller on the HiKey board, as my last patchset

Re: [PATCH 1/4 v3] usb: dwc2: Avoid sleeping while holding hsotg->lock

2017-01-16 Thread John Stultz
On Mon, Jan 16, 2017 at 2:36 AM, Felipe Balbi <felipe.ba...@linux.intel.com> wrote: > > Hi, > > John Stultz <john.stu...@linaro.org> writes: >> Basically when plugging in various cables in different orders, I'm >> occasionally seeing the following BUG splat:

Re: [PATCH 1/4 v3] usb: dwc2: Avoid sleeping while holding hsotg->lock

2017-01-16 Thread John Stultz
On Mon, Jan 16, 2017 at 12:57 PM, John Youn <john.y...@synopsys.com> wrote: > > >> On Jan 16, 2017, at 12:37 PM, John Stultz <john.stu...@linaro.org> wrote: >> >> On Mon, Jan 16, 2017 at 2:36 AM, Felipe Balbi >> <felipe.ba...@linux.intel.com>

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 --

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 <john.stu...@linaro.org> wrote: > On Mon, Oct 3, 2016 at 1:07 PM, Michal Nazarewicz <min...@mina86.com> wrote: >> On Mon, Oct 03 2016, John Stultz wrote: >>> Can you resend it using git-send-email or in some way other the

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

2016-10-03 Thread John Stultz
s disabled between ep > request finishes and data is copied to user space). > > Chen, John, if you could test this version as well, that would be > swell. for both patches: Tested-by: John Stultz <john.stu...@linaro.org> Thanks so much for these! -john -- To unsubscribe from

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 <john.y...@synopsys.com> 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

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 <felipe.ba...@linux.intel.com> wrote: > John Stultz <john.stu...@linaro.org> writes: >> I had seen some odd behavior with HiKey's usb-gadget interface >> that I finally seemed to have chased down. Basically every other >&

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

2016-10-19 Thread John Stultz
.@synopsys.com> Cc: Douglas Anderson <diand...@chromium.org> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu <cheny...@huawei.com> [jstultz: Reworked to simplify the patch, and made commit log to be more specific abo

[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

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

2016-10-20 Thread John Stultz
...@chromium.org> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/gadget.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 2

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

2016-10-19 Thread John Stultz
<gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu <cheny...@huawei.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/hcd.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c inde

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

2016-11-22 Thread John Stultz
ipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz <john.stu...@linaro.org> --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 11 +++ drivers/phy/Kconfig | 2 + drivers/phy/phy-hi

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

2016-11-22 Thread John Stultz
Cc: Chen Yu <cheny...@huawei.com> Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org John Stultz (3): phy: phy-hi6220-usb: Wire up extconn support to hik

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

2016-11-22 Thread John Stultz
el.org> Cc: John Youn <johny...@synopsys.com> Cc: Douglas Anderson <diand...@chromium.org> Cc: Chen Yu <cheny...@huawei.com> Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundati

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

2016-11-22 Thread John Stultz
iand...@chromium.org> Cc: Chen Yu <cheny...@huawei.com> Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Suggested-by: Chen Yu <cheny...

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 <john.y...@synopsys.com> 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

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 <john.stu...@linaro.org> 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/hik

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

2016-11-15 Thread John Stultz
<cheny...@huawei.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Chen Yu (1): usb: dwc2: Force port resume on switching to device mode John Stultz (2): usb: dwc2: Avoid suspending if we're in ga

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

2016-11-15 Thread John Stultz
gt; Cc: John Youn <johny...@synopsys.com> Cc: Douglas Anderson <diand...@chromium.org> Cc: Chen Yu <cheny...@huawei.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: John Stult

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

2016-11-15 Thread John Stultz
; Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu <cheny...@huawei.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/hcd.c | 8

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

2016-11-15 Thread John Stultz
rtman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Suggested-by: Chen Yu <cheny...@huawei.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/hcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.

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

2016-10-13 Thread John Stultz
...@chromium.org> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu <cheny...@huawei.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/hcd.c | 8 1 file changed, 8 insertions(+) diff --git a/driv

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 <john.stu...@linaro.org> wrote: > From: Chen Yu <cheny...@huawei.com> > > 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 manu

[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

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

2016-10-13 Thread John Stultz
@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu <cheny...@huawei.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 1 + drivers/usb/dwc2/core.h | 7 +++ drivers/usb/dwc2/hcd.c

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 <robh...@kernel.org> wrote: > On Thu, Oct 13, 2016 at 6:29 PM, John Stultz <john.stu...@linaro.org> wrote: >> From: Chen Yu <cheny...@huawei.com> >> >> The Hi6220's usb controller is limited in that it does not

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 <john.y...@synopsys.com> 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 >> c

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

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 <john.stu...@linaro.org> 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: &

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 <cheny...@huawei.com> 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 <john.y...@synopsys.com> wrote: >>>> On 12/6/2016 5:48 PM,

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

2016-12-12 Thread John Stultz
.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> 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 sleeping

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

2016-12-12 Thread John Stultz
gt; Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/core.c | 6 +++---

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

2016-12-12 Thread John Stultz
..@chromium.org> Cc: Chen Yu <cheny...@huawei.com> Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Acked-by: John Youn <johny...@synopsys.com&g

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

2016-12-12 Thread John Stultz
.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Suggested-by: Chen Yu <cheny...@huawei.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/hcd.c | 3 +++ 1 file changed, 3 insertions(+) di

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

2016-12-12 Thread John Stultz
Signed-off-by: Chen Yu <cheny...@huawei.com> [jstultz: Reworked to simplify the patch, and made commit log to be more specific about the issue] Signed-off-by: John Stultz <john.stu...@linaro.org> --- v2: * Fix build issue reported by kbuildbot * Rework to avoid using new dts entry sug

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

2016-12-12 Thread John Stultz
; Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu <cheny...@huawei.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/hcd.c | 7 +++ 1 file

[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

[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 [

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 <john.y...@synopsys.com> 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 >> w

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 <john.y...@synopsys.com> 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 >> w

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 <st...@rowland.harvard.edu> wrote: > On Mon, 12 Dec 2016, John Stultz wrote: > >> From: Chen Yu <cheny...@huawei.com> >> >> The Hi6220's usb controller is limited in that it does not >> support "Split Tran

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 <john.y...@synopsys.com> 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 infrast

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 <john.stu...@linaro.org> wrote: > On Tue, Dec 6, 2016 at 4:26 PM, John Youn <john.y...@synopsys.com> wrote: >> On 12/6/2016 4:05 PM, John Stultz wrote: >>> On Tue, Dec 6, 2016 at 3:17 PM, John Youn <john.y...@synopsys.com

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_() ->

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 <john.y...@synopsys.com> wrote: > On 12/6/2016 4:05 PM, John Stultz wrote: >> On Tue, Dec 6, 2016 at 3:17 PM, John Youn <john.y...@synopsys.com> wrote: >>> Also, do you really need this at all? Wasn't your system previously

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

2016-12-06 Thread John Stultz
.@huawei.com> Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/hcd.c | 5

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 <vardan.mikayel...@synopsys.com> 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,

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

2016-12-08 Thread John Stultz
gt; Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/core.c | 6 +++---

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 <john.y...@synopsys.com> 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 o

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 <john.y...@synopsys.com> wrote: > On 12/8/2016 4:25 PM, John Stultz wrote: >> On Thu, Dec 8, 2016 at 4:17 PM, John Youn <john.y...@synopsys.com> wrote: >>> On 12/8/2016 3:12 PM, John Stultz wrote: >>>> Hey J

Re: [PATCH 2/3] usb: dwc2: gadget: Fix DMA memory freeing

2017-01-09 Thread John Stultz
On Mon, Jan 9, 2017 at 1:10 PM, John Youn <john.y...@synopsys.com> wrote: > From: Vardan Mikayelyan <mvar...@synopsys.com> > > Remove DMA memory free from EP disable flow by replacing > dma_alloc_coherent with dmam_alloc_coherent. > > Cc: John Stultz <joh

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

2017-01-11 Thread John Stultz
On Wed, Jan 11, 2017 at 2:08 PM, John Youn <john.y...@synopsys.com> wrote: > On 1/3/2017 11:52 AM, John Stultz wrote: >> Hope everyone had a happy new years! >> >> I just wanted to send out my current queue of patches for dwc2 >> controller on the HiKey boa

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

2017-01-11 Thread John Stultz
On Wed, Jan 11, 2017 at 2:58 PM, John Youn <john.y...@synopsys.com> wrote: > On 1/11/2017 2:39 PM, John Stultz wrote: >> On Wed, Jan 11, 2017 at 2:08 PM, John Youn <john.y...@synopsys.com> wrote: >>> On 1/3/2017 11:52 AM, John Stultz wrote: >>>> Hope e

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

2017-01-11 Thread John Stultz
> Cc: Vardan Mikayelyan <mvar...@synopsys.com> Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu <cheny...@huawei.com> Sig

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

2017-01-11 Thread John Stultz
inuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu <cheny...@huawei.com> [jstultz: Reworked to simplify the patch, and made commit log to be more specific about the issue] Signed-off-by: John Stultz <john.stu...@linaro.org> --- v2: * Fix build issue reported by k

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

2017-01-11 Thread John Stultz
..@huawei.com> Cc: Vardan Mikayelyan <mvar...@synopsys.com> Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz <john.stu...@linaro.org&

[PATCH 0/4 v3] Fixes and workarounds for dwc2 on HiKey board (rebased to synopsys-usb/next)

2017-01-11 Thread John Stultz
Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> 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 neg

[PATCH 2/4 v3] usb: dwc2: Workaround case where GOTGCTL state is wrong

2017-01-11 Thread John Stultz
l.org Acked-by: John Youn <johny...@synopsys.com> Reviewed-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- v2: Rework goto logic suggested by Vardan, and add a comment v3: * Rebased to synopsys-usb/next branch --- drivers/usb/dwc2/hcd.

Re: [PATCH 0/4 v3] Fixes and workarounds for dwc2 on HiKey board (rebased to synopsys-usb/next)

2017-01-12 Thread John Stultz
On Thu, Jan 12, 2017 at 12:05 AM, Felipe Balbi <felipe.ba...@linux.intel.com> wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> On 1/11/2017 4:22 PM, John Stultz wrote: >>> Just wanted to resend my patches for dwc2 controller on the >>

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 <kis...@ti.com> 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_ph

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

2016-12-06 Thread John Stultz
s Anderson <diand...@chromium.org> Cc: Chen Yu <cheny...@huawei.com> Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Chen Yu (1): usb: dwc2

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

2016-12-06 Thread John Stultz
rtman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Suggested-by: Chen Yu <cheny...@huawei.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/hcd.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.

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

2016-12-06 Thread John Stultz
.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz <john.stu...@linaro.org> --- v2: * Move extcon logic from generic phy to dwc2 driver, as suggested by Kishon. --- arch/arm64/boot/dts/hisilicon/hi6220.d

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

2016-12-06 Thread John Stultz
; Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu <cheny...@huawei.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/hcd.c | 8

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 <john.stu...@linaro.org> 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.

Re: [PATCH] usb: dwc2: fix panic for coherent memory allocation

2017-01-06 Thread John Stultz
On Thu, Jan 5, 2017 at 6:50 PM, Leo Yan wrote: > When use configfs to configure USB port as as ethernet gadget, the > kernel has panic with below backtrace; it clearly indicates the > coherent memory allocation is happened in the interrupt context, > but the function

Re: [PATCH] usb: dwc2: use u32 for DT binding parameters

2017-01-06 Thread John Stultz
o, does the patch need a respin, or is it against Linus' HEAD and my tree is stale? Anyway, after re-applying it to my tree: Tested-by: John Stultz <john.stu...@linaro.org> thanks -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: [PATCH] usb: dwc2: gadget: Fix DMA memory freeing

2017-01-06 Thread John Stultz
On Thu, Jan 5, 2017 at 6:01 PM, John Youn <john.y...@synopsys.com> wrote: > From: Vardan Mikayelyan <mvar...@synopsys.com> > > Remove DMA memory free from EP disable flow by replacing > dma_alloc_coherent with dmam_alloc_coherent. > > Cc: John Stultz <joh

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

2017-01-03 Thread John Stultz
On Tue, Jan 3, 2017 at 4:31 PM, John Youn <john.y...@synopsys.com> wrote: > On 1/3/2017 12:05 PM, John Stultz wrote: >> On Tue, Jan 3, 2017 at 11:52 AM, John Stultz <john.stu...@linaro.org> wrote: >>> Hope everyone had a happy new years! >>> >>

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

2017-01-03 Thread John Stultz
On Tue, Jan 3, 2017 at 11:52 AM, John Stultz <john.stu...@linaro.org> wrote: > Hope everyone had a happy new years! > > I just wanted to send out my current queue of patches for dwc2 > controller on the HiKey board for consideration for the 4.11 > merge window. > > This

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

2017-01-03 Thread John Stultz
am I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> 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 Hi

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

2017-01-03 Thread John Stultz
l.org Acked-by: John Youn <johny...@synopsys.com> Reviewed-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- v2: Rework goto logic suggested by Vardan, and add a comment drivers/usb/dwc2/hcd.c | 9 + 1 file changed, 9 i

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

2017-01-03 Thread John Stultz
inuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu <cheny...@huawei.com> [jstultz: Reworked to simplify the patch, and made commit log to be more specific about the issue] Signed-off-by: John Stultz <john.stu...@linaro.org> --- v2: * Reworked to adapt around

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

2017-01-03 Thread John Stultz
am I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Suggested-by: Chen Yu <cheny...@huawei.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- drivers/usb/dwc2/hcd.c |

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

2017-01-03 Thread John Stultz
..@huawei.com> Cc: Vardan Mikayelyan <mvar...@synopsys.com> Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz <john.stu...@linaro

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

2017-01-03 Thread John Stultz
> Cc: Vardan Mikayelyan <mvar...@synopsys.com> Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu <cheny...@huawei.com> Signe

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

2016-12-16 Thread John Stultz
inuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: Chen Yu <cheny...@huawei.com> [jstultz: Reworked to simplify the patch, and made commit log to be more specific about the issue] Signed-off-by: John Stultz <john.stu...@linaro.org> --- v2: * Fix build issue reported by k

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

2016-12-16 Thread John Stultz
x-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 is wrong u

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

2016-12-16 Thread John Stultz
..@huawei.com> Cc: Vardan Mikayelyan <mvar...@synopsys.com> Cc: Kishon Vijay Abraham I <kis...@ti.com> Cc: Felipe Balbi <felipe.ba...@linux.intel.com> Cc: Greg Kroah-Hartman <gre...@linuxfoundation.org> Cc: linux-usb@vger.kernel.org Signed-off-by: John Stultz <john.stu...@linaro

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

2016-12-16 Thread John Stultz
l.org Acked-by: John Youn <johny...@synopsys.com> Reviewed-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Stultz <john.stu...@linaro.org> --- v2: Rework goto logic suggested by Vardan, and add a comment --- drivers/usb/dwc2/hcd.c | 9 + 1 file changed, 9 i

  1   2   >