Re: [PATCH 00/13] usb: dwc2: Fix up gadget isochronous support

2016-05-18 Thread John Youn
On 5/18/2016 3:44 AM, John Keeping wrote: > On Tue, 17 May 2016 16:16:23 -0700, John Youn wrote: > >> The following patch series fixes up isochronous support for the dwc2 >> gadget. The existing isochronous support lacked a few features. Most >> notably it did not properl

Re: [PATCH 00/13] usb: dwc2: Fix up gadget isochronous support

2016-05-18 Thread John Youn
On 5/18/2016 12:34 AM, Felipe Balbi wrote: > > Hi John, > > John Youn <johny...@synopsys.com> writes: >> The following patch series fixes up isochronous support for the dwc2 >> gadget. The existing isochronous support lacked a few features. Most >>

Re: usb: dwc2: regression on MyBook Live Duo / Canyonlands since 4.3.0-rc4

2016-05-17 Thread John Youn
On 5/14/2016 6:11 AM, Christian Lamparter wrote: > On Thursday, May 12, 2016 11:40:28 AM John Youn wrote: >> On 5/12/2016 6:30 AM, Christian Lamparter wrote: >>> On Thursday, May 12, 2016 01:55:44 PM Arnd Bergmann wrote: >>>> On Thursday 12 May 2016 11:5

[PATCH 12/13] usb: dwc2: gadget: Add EP disabled interrupt handler

2016-05-17 Thread John Youn
<vahr...@synopsys.com> Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 87 ++- 1 file changed, 70 insertions(+), 17 deletions(-) diff --git a/dri

[PATCH 03/13] usb: dwc2: gadget: Remove unnecessary code

2016-05-17 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> This chunk is not needed here. There is no functionality depend on this, so if no-op, I think we do not need to have this interrupt unmasked. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny.

[PATCH 01/13] usb: dwc2: Add missing register field definitions

2016-05-17 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> Added register field definitions, register names are according DWC-OTG databook. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/hw.h | 13 +++

[PATCH 08/13] usb: dwc2: gadget: Add dwc2_gadget_read_ep_interrupts function

2016-05-17 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> Reads and returns interrupts for given endpoint, by masking epint_reg with corresponding mask. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/

[PATCH 11/13] usb: dwc2: gadget: Add Incomplete ISO IN/OUT Interrupt handlers

2016-05-17 Thread John Youn
Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 173 +- 1 file changed, 124 insertions(+), 49 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c i

[PATCH 13/13] usb: dwc2: gadget: Final fixes for BDMA ISOC

2016-05-17 Thread John Youn
now I have added mechanism to set pid and excluded all code where this flag was set. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 1 - drivers/usb/

[PATCH 00/13] usb: dwc2: Fix up gadget isochronous support

2016-05-17 Thread John Youn
The following patch series fixes up isochronous support for the dwc2 gadget. The existing isochronous support lacked a few features. Most notably it did not properly sync up with the first packet and it didn't handle the Incomplete ISO IN/OUT interrupts. These patches have been sitting in our

[PATCH 09/13] usb: dwc2: gadget: Add dwc2_gadget_start_next_request function

2016-05-17 Thread John Youn
to do resynchronization. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 51 +++ 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/drivers/usb/dwc2/

[PATCH 04/13] usb: dwc2: gadget: Corrected field names

2016-05-17 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> No-op change. Changed field names to prevent misunderstanding. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 6 +++--- 1 file changed,

[PATCH 05/13] usb: dwc2: gadget: Fix transfer stop programming for out endpoint

2016-05-17 Thread John Youn
ication must enable Global OUT NAK mode, so if this mode is enabled we can continue without this step. Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 6 ++ 1 file changed, 2 insertions(+), 4

[PATCH 02/13] usb: dwc2: gadget: Remove unnecessary line

2016-05-17 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> Removed "ctrl |= DXEPCTL_USBACTEP" from dwc2_hsotg_start_req() function because this step is done in dwc2_hsotg_ep_enable(). Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synop

[PATCH 06/13] usb: dwc2: gadget: Add dwc2_gadget_incr_frame_num()

2016-05-17 Thread John Youn
verrun: Indicates SOF number overrun in DSTS Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 5 + drivers/usb/dwc2/gadget.c | 19 +++ 2 files changed, 24 insertions(+) diff --git

[PATCH 07/13] usb: dwc2: gadget: Corrected interval calculation

2016-05-17 Thread John Youn
lue; Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.h | 2 +- drivers/usb/dwc2/gadget.c | 11 +++ 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/drivers/usb/dwc2/core.h b/d

[PATCH 10/13] usb: dwc2: gadget: Add OUTTKNEPDIS and NAKINTRPT handlers

2016-05-17 Thread John Youn
<mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 94 +++ 1 file changed, 94 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 0be46e7..3a1f6a2 100644 ---

Re: [PATCH v4] usb: dwc2: fix regression on big-endian PowerPC/ARM systems

2016-05-13 Thread John Youn
c inline u32 dwc2_readl(const void __iomem *addr) > +{ > + return readl(addr); > +} > + > +static inline void dwc2_writel(u32 value, void __iomem *addr) > +{ > + writel(value, addr); > + > +#ifdef DWC2_LOG_WRITES > + pr_info("info:: wrote %08x t

Re: [PATCH v3] usb: dwc2: fix regression on big-endian PowerPC/ARM systems

2016-05-13 Thread John Youn
On 5/12/2016 1:56 PM, Arnd Bergmann wrote: > A patch that went into Linux-4.4 to fix big-endian mode on a Lantiq > MIPS system unfortunately broke big-endian operation on PowerPC > APM82181 as reported by Christian Lamparter, and likely other > systems. > > It actually introduced multiple issues:

Re: usb: dwc2: regression on MyBook Live Duo / Canyonlands since 4.3.0-rc4

2016-05-12 Thread John Youn
On 5/12/2016 1:39 PM, Christian Lamparter wrote: > On Thursday, May 12, 2016 11:40:28 AM John Youn wrote: >> On 5/12/2016 6:30 AM, Christian Lamparter wrote: >>> On Thursday, May 12, 2016 01:55:44 PM Arnd Bergmann wrote: >>>> On Thursday 12 May 2016 11:5

Re: usb: dwc2: regression on MyBook Live Duo / Canyonlands since 4.3.0-rc4

2016-05-12 Thread John Youn
On 5/12/2016 6:30 AM, Christian Lamparter wrote: > On Thursday, May 12, 2016 01:55:44 PM Arnd Bergmann wrote: >> On Thursday 12 May 2016 11:58:18 Christian Lamparter wrote: >> Detecting the endianess of the >> device is probably the best future-proof solution, but it's also >>

Re: usb: dwc2: regression on MyBook Live Duo / Canyonlands since 4.3.0-rc4

2016-05-09 Thread John Youn
On 5/9/2016 1:39 PM, Arnd Bergmann wrote: > On Monday 09 May 2016 13:22:48 John Youn wrote: >> On 5/9/2016 3:36 AM, Arnd Bergmann wrote: >>> On Monday 09 May 2016 10:23:22 Benjamin Herrenschmidt wrote: >>>> On Sun, 2016-05-08 at 13:44 +0200, Christian Lamparter wrote:

Re: usb: dwc2: regression on MyBook Live Duo / Canyonlands since 4.3.0-rc4

2016-05-09 Thread John Youn
On 5/9/2016 3:36 AM, Arnd Bergmann wrote: > On Monday 09 May 2016 10:23:22 Benjamin Herrenschmidt wrote: >> On Sun, 2016-05-08 at 13:44 +0200, Christian Lamparter wrote: >>> On Sunday, May 08, 2016 08:40:55 PM Benjamin Herrenschmidt wrote: On Sun, 2016-05-08 at 00:54 +0200, Christian

Re: [PATCH] usb: dwc3: usb/dwc3: fake dissconnect event when turn off pullup

2016-05-04 Thread John Youn
On 5/4/2016 3:42 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >>> John Youn <john.y...@synopsys.com> writes: >>>>> "Du, Changbin" <changbin...@intel.com> writes: >>>>>> Hi,

Re: [PATCH 1/2] usb: dwc3: gadget: update DCFG.NumP to max burst size

2016-05-01 Thread John Youn
On 4/28/2016 11:05 PM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> On 4/28/2016 1:01 AM, Felipe Balbi wrote: >>> NumP field of DCFG register is used on NumP field of >>> ACK TP header and it tells the host how many

Re: [PATCH] usb: dwc3: usb/dwc3: fake dissconnect event when turn off pullup

2016-05-01 Thread John Youn
On 4/28/2016 11:12 PM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >>> "Du, Changbin" <changbin...@intel.com> writes: >>>> Hi, Balbi, >>>> >>>> The step to reproduce this issue is: >

Re: [PATCH 1/2] usb: dwc3: gadget: update DCFG.NumP to max burst size

2016-04-28 Thread John Youn
On 4/28/2016 1:01 AM, Felipe Balbi wrote: > NumP field of DCFG register is used on NumP field of > ACK TP header and it tells the host how many packets > an endpoint can receive before waiting for > synchronization. > > Documentation says it should be set to anything > <=bMaxBurst. Interestingly,

Re: [PATCH] usb: dwc3: usb/dwc3: fake dissconnect event when turn off pullup

2016-04-28 Thread John Youn
On 4/27/2016 11:48 PM, Felipe Balbi wrote: > > Hi, > > (we don't top-post on this forum ;-) > > "Du, Changbin" writes: >> Hi, Balbi, >> >> The step to reproduce this issue is: >> 1) connect device to a host and wait its enumeration. >> 2) trigger software disconnect by

[PATCH 5/5] usb: dwc2: Proper cleanup on dr_mode failure

2016-04-27 Thread John Youn
Cleanup in probe if we fail to get dr_mode. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/platform.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c index 88629be..fc6f525 100644 --- a/d

[PATCH 3/5] usb: dwc2: host: Setting qtd to NULL after freeing it

2016-04-27 Thread John Youn
From: Vardan Mikayelyan <mvar...@synopsys.com> This is safety change added while doing slub debugging. Affected functions: dwc2_hcd_qtd_unlink_and_free() _dwc2_hcd_urb_enqueue() Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.co

[PATCH 4/5] usb: dwc2: Fixed SOF interrupt enabling/disabling

2016-04-27 Thread John Youn
From: Sevak Arakelyan <sev...@synopsys.com> In case of DDMA mode we don't need to get an SOF interrupt so disable the unmasking of SOF interrupt in DDMA mode. Signed-off-by: Sevak Arakelyan <sev...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/us

[PATCH 2/5] usb: dwc2: gadget: Prevent handling of host interrupts

2016-04-27 Thread John Youn
m> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index d330190..4c5e300 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c

[PATCH 1/5] usb: dwc2: gadget: Check for ep0 in enable

2016-04-27 Thread John Youn
From: Vahram Aharonyan <vahr...@synopsys.com> Replaced the WARN_ON with a check and return of -EINVAL in the dwc2_hsotg_ep_enable function if ep0 is passed in. Signed-off-by: Vahram Aharonyan <vahr...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers

[PATCH 0/5] usb: dwc2: Various fixes

2016-04-27 Thread John Youn
Hi Felipe, These are some various patches for dwc2 for next. Thanks, John John Youn (1): usb: dwc2: Proper cleanup on dr_mode failure Sevak Arakelyan (1): usb: dwc2: Fixed SOF interrupt enabling/disabling Vahram Aharonyan (1): usb: dwc2: gadget: Check for ep0 in enable Vardan

Re: [PATCHv7] usb: dwc2: Add reset control to dwc2

2016-04-25 Thread John Youn
ult UTMI width */ > hsotg->phyif = GUSBCFG_PHYIF16; > > @@ -434,6 +453,9 @@ static int dwc2_driver_remove(struct platform_device *dev) > if (hsotg->ll_hw_enabled) > dwc2_lowlevel_hw_disable(hsotg); > > + if (hsotg->reset) > + reset_control_

Re: [PATCHv6 2/2] usb: dwc2: Add reset control to dwc2

2016-04-25 Thread John Youn
On 4/25/2016 12:30 AM, Philipp Zabel wrote: > Hi John, > > Am Freitag, den 22.04.2016, 20:31 -0700 schrieb John Youn: >> On 4/20/2016 2:31 PM, dingu...@opensource.altera.com wrote: >>> From: Dinh Nguyen <dingu...@opensource.altera.com> >>> >>>

Re: [PATCHv6 2/2] usb: dwc2: Add reset control to dwc2

2016-04-22 Thread John Youn
On 4/20/2016 2:31 PM, dingu...@opensource.altera.com wrote: > From: Dinh Nguyen > > Allow for platforms that have a reset controller driver in place to bring > the USB IP out of reset. > > Signed-off-by: Dinh Nguyen > --- > v6:

Re: [PATCHv5] usb: dwc2: Add reset control to dwc2

2016-04-15 Thread John Youn
On 4/14/2016 2:38 PM, dingu...@opensource.altera.com wrote: > From: Dinh Nguyen > > Allow for platforms that have a reset controller driver in place to bring > the USB IP out of reset. > > Signed-off-by: Dinh Nguyen > --- > v5:

Re: [PATCHv3 2/2] usb: dwc2: Add reset control to dwc2

2016-04-14 Thread John Youn
On 4/13/2016 7:04 PM, Arnd Bergmann wrote: > On Thursday 14 April 2016, dingu...@opensource.altera.com wrote: >> @@ -337,6 +338,17 @@ static int dwc2_lowlevel_hw_init(struct dwc2_hsotg >> *hsotg) >> { >> int i, ret; >> >> + hsotg->reset = devm_reset_control_get(hsotg->dev,

Re: [RFC] Change bcdUSB in older kernels to return 0x0310 for SuperSpeed

2016-04-13 Thread John Youn
On 4/13/2016 7:58 AM, Alan Stern wrote: > On Tue, 12 Apr 2016, John Youn wrote: > >>> Wait, even SuperSpeed GEN1-only devices *must* set bcdUSB to 0x0310 ? Do >>> you have a reference to that ? I find that pretty odd because this means >>> that if I take any of my

Re: [PATCHv3] usb: dwc2: Add reset control to dwc2

2016-04-13 Thread John Youn
On 4/13/2016 11:52 AM, Dinh Nguyen wrote: > On 04/13/2016 11:23 AM, Stefan Wahren wrote: > >>> + hsotg->reset = devm_reset_control_get(hsotg->dev, "dwc2"); >> >> shouldn't this be documented in >> Documentation/devicetree/bindings/usb/dwc2.txt ? >> > > Sure, I can document it. > >>> + if

Re: [RFC] Change bcdUSB in older kernels to return 0x0310 for SuperSpeed

2016-04-12 Thread John Youn
On 4/12/2016 12:18 AM, Bjørn Mork wrote: > John Youn <john.y...@synopsys.com> writes: > >> Hi, >> >> I would like to port the following commit from 4.6 to older kernels. >> >> 1a85329171094951956a37acc8abb7e51c1e742e ("usb: gadget: composite: >>

Re: [RFC] Change bcdUSB in older kernels to return 0x0310 for SuperSpeed

2016-04-12 Thread John Youn
On 4/11/2016 11:25 PM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> Hi, >> >> I would like to port the following commit from 4.6 to older kernels. >> >> 1a85329171094951956a37acc8abb7e51c1e742e ("usb: gad

[RFC] Change bcdUSB in older kernels to return 0x0310 for SuperSpeed

2016-04-11 Thread John Youn
Hi, I would like to port the following commit from 4.6 to older kernels. 1a85329171094951956a37acc8abb7e51c1e742e ("usb: gadget: composite: Return bcdUSB 0x0310") https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/commit/?id=1a85329171094951956a37acc8abb7e51c1e742e There is a some

Re: [PATCH v2] usb: gadget: composite: Clear reserved fields of SSP Dev Cap

2016-04-11 Thread John Youn
On 4/10/2016 10:17 PM, Felipe Balbi wrote: > > Hi, > > John Youn <johny...@synopsys.com> writes: >> Set the reserved fields of the SuperSpeed Plus Device Capability >> descriptor to 0. Otherwise there might be stale data there which will >> cause USB CV to f

[PATCH v2] usb: gadget: composite: Clear reserved fields of SSP Dev Cap

2016-04-08 Thread John Youn
Set the reserved fields of the SuperSpeed Plus Device Capability descriptor to 0. Otherwise there might be stale data there which will cause USB CV to fail. Fixes: f228a8de242a ("usb: gadget: composite: Return SSP Dev Cap descriptor") Signed-off-by: John Youn <johny...@synopsys

[PATCH] usb: gadget: composite: Clear reserved fields of SSP Dev Cap

2016-04-08 Thread John Youn
Set the reserved fields of the SuperSpeed Plus Device Capability descriptor to 0. Otherwise there might be stale data there which will cause USB CV to fail. Fixes: f228a8de242a ("usb: gadget: composite: Return SSP Dev Cap descriptor") Signed-off-by: John Youn <johny...@synopsys.com&

Re: [RFT PATCH 0/4] usb: dwc2: Fix core reset and force mode delay problems

2016-04-07 Thread John Youn
On 4/4/2016 3:51 AM, Felipe Balbi wrote: > > Hi John, > > John Youn <johny...@synopsys.com> writes: >> The following patch series addresses the core reset and force mode >> delay problems we have been seeing on dwc2 for some platforms. >> >

Re: [RFT PATCH 0/4] usb: dwc2: Fix core reset and force mode delay problems

2016-04-07 Thread John Youn
On 4/7/2016 1:36 PM, Michael Niewoehner wrote: > > Am 07.04.2016 um 20:41 schrieb John Youn <john.y...@synopsys.com>: > >> On 3/31/2016 2:44 PM, Michael Niewoehner wrote: >>> Hi John, >>> >>> Am 29.03.2016 um 04:36 schrieb John Youn <johny...@

Re: [RFT PATCH 0/4] usb: dwc2: Fix core reset and force mode delay problems

2016-04-07 Thread John Youn
On 3/31/2016 2:44 PM, Michael Niewoehner wrote: > Hi John, > > Am 29.03.2016 um 04:36 schrieb John Youn <johny...@synopsys.com>: > >> Hi, >> >> The following patch series addresses the core reset and force mode >> delay problems we have been seeing o

Re: [PATCH 1/2] usb: dwc2: Add reset control to dwc2

2016-04-07 Thread John Youn
On 3/28/2016 10:38 PM, dingu...@opensource.altera.com wrote: > From: Dinh Nguyen <dingu...@opensource.altera.com> > > Allow for platforms that have a reset controller driver in place to bring > the USB IP out of reset. > > Signed-off-by: Dinh Nguyen <dingu...@openso

Re: [PATCH] usb: dwc2: do not override forced dr_mode in gadget setup

2016-03-30 Thread John Youn
On 3/30/2016 8:08 AM, Przemek Rudy wrote: > On 03/30/2016 12:15 PM, Felipe Balbi wrote: >> John Youn <john.y...@synopsys.com> writes: >>> [ text/plain ] >>> On 3/16/2016 3:10 PM, Przemek Rudy wrote: >>>> The host/device mode set with dr_mode should

Re: [PATCH] usb: dwc2: gadget: avoid null dereference on incomplete transfer

2016-03-30 Thread John Youn
On 3/30/2016 6:22 AM, Felipe Balbi wrote: > > Hi, > > John Keeping writes: >> Setting up a gadget with the uac2 function results in: >> >> Unable to handle kernel NULL pointer dereference at virtual address >> 0058 >> ... >> PC is at dwc2_hsotg_irq+0x7f0/0x908 >>

Re: [PATCH 1/2] usb: dwc3: core: Introduce dwc3_device_reinit()

2016-03-30 Thread John Youn
On 3/23/2016 11:52 PM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> [ text/plain ] >> On 3/21/2016 11:40 PM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> John Youn <john.y...@synopsys.com>

[RFT PATCH 4/4] usb: dwc2: Properly account for the force mode delays

2016-03-28 Thread John Youn
unnecessary delays. Also remove the dwc2_force_mode_if_needed() function since the "if needed" part is already taken care of by the polling in dwc2_force_mode(). Finally, remove all other calls to dwc2_clear_force_mode(). Signed-off-by: John Youn <johny...@synopsys.com> --- drivers

[RFT PATCH 0/4] usb: dwc2: Fix core reset and force mode delay problems

2016-03-28 Thread John Youn
John Youn (3): usb: dwc2: gadget: Only initialize device if in device mode usb: dwc2: Add delay to core soft reset usb: dwc2: Properly account for the force mode delays Przemek Rudy (1): usb: dwc2: do not override forced dr_mode in gadget setup drivers/usb/dwc2/core.c | 195

[RFT PATCH 2/4] usb: dwc2: gadget: Only initialize device if in device mode

2016-03-28 Thread John Youn
In dwc2_hsotg_udc_start(), don't initialize the controller for device mode unless we are actually in device mode. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 7 +-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/gadg

[RFT PATCH 1/4] usb: dwc2: do not override forced dr_mode in gadget setup

2016-03-28 Thread John Youn
From: Przemek Rudy <pru...@o2.pl> The host/device mode set with dr_mode should be kept all the time, not being changed to OTG in gadget setup (by overriding CFGUSB_FORCEDEVMODE and CFGUSB_FORCEHOSTMODE bits). Signed-off-by: Przemek Rudy <pru...@o2.pl> Signed-off-by: John

[RFT PATCH 3/4] usb: dwc2: Add delay to core soft reset

2016-03-28 Thread John Youn
the IDDIG debounce filter will occur before going back to host mode. Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/core.c | 97 + drivers/usb/dwc2/core.h | 1 + drivers/usb/dwc2/hw.h | 1 + 3 files changed, 99 inse

[PATCH 2/2] usb: gadget: composite: Access SSP Dev Cap fields properly

2016-03-28 Thread John Youn
Access multi-byte fields of the SSP Dev Cap descriptor using the correct endianness. Fixes: f228a8de242a ("usb: gadget: composite: Return SSP Dev Cap descriptor") Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/gadget/composite.c | 8 +--- 1 file changed, 5

[PATCH 1/2] usb: Fix SSP Device Cap wFunctionalitySupport type

2016-03-28 Thread John Youn
The wFunctionalitySupport field should be __le16. Signed-off-by: John Youn <johny...@synopsys.com> --- include/uapi/linux/usb/ch9.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/usb/ch9.h b/include/uapi/linux/usb/ch9.h index 06d6c62..d5ce716

[PATCH 0/2] Fix endianness issues for SSP dev cap descriptor

2016-03-28 Thread John Youn
Hi Felipe, Couple patches to fix endianness issues with the SuperSpeedPlus gadget patches. Regards, John John Youn (2): usb: Fix SSP Device Cap wFunctionalitySupport type usb: gadget: composite: Access SSP Dev Cap fields properly drivers/usb/gadget/composite.c | 8 +--- include/uapi

Re: [PATCH] usb: dwc2: do not override forced dr_mode in gadget setup

2016-03-24 Thread John Youn
? 9 : 5; > - dwc2_writel(hsotg->phyif | GUSBCFG_TOUTCAL(7) | > - (trdtim << GUSBCFG_USBTRDTIM_SHIFT), > - hsotg->regs + GUSBCFG); > + usbcfg |= hsotg->phyif | GUSBCFG_TOUTCAL(7) | > + (trdtim << GUSBCFG_USBT

Re: Problem with dwc2 gadget isochronous in transfers

2016-03-24 Thread John Youn
On 3/24/2016 4:32 AM, John Keeping wrote: > Hi, > > I've been trying to use the uac2 gadget function on a Radxa Rock2 board > which uses the dwc2 driver, but it seems there is a problem with > isochronous in endpoints (out works fine). > > When trying to use the audio gadget no data is

Re: [RFT PATCH 2/2] Revert "usb: dwc2: Fix probe problem on bcm2835"

2016-03-24 Thread John Youn
On 3/22/2016 12:44 PM, Doug Anderson wrote: > John, > > On Tue, Mar 22, 2016 at 12:26 PM, John Youn <john.y...@synopsys.com> wrote: >> Thanks for the debug logs and everyones help. >> >> After reviewing with our hardware engineers, it seems this is likely

Re: [PATCH 1/2] usb: dwc3: core: Introduce dwc3_device_reinit()

2016-03-23 Thread John Youn
On 3/21/2016 11:40 PM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> [ text/plain ] >> On 3/18/2016 12:17 PM, John Youn wrote: >>> On 3/16/2016 6:56 AM, Felipe Balbi wrote: >>>> >>>> heh, +john >&

Re: [RFT PATCH 2/2] Revert "usb: dwc2: Fix probe problem on bcm2835"

2016-03-22 Thread John Youn
On 3/22/2016 12:44 PM, Doug Anderson wrote: > John, > > On Tue, Mar 22, 2016 at 12:26 PM, John Youn <john.y...@synopsys.com> wrote: >> Thanks for the debug logs and everyones help. >> >> After reviewing with our hardware engineers, it seems this is likely

Re: [RFT PATCH 2/2] Revert "usb: dwc2: Fix probe problem on bcm2835"

2016-03-22 Thread John Youn
On 3/18/2016 10:21 PM, Doug Anderson wrote: > Hi, > > On Wed, Mar 16, 2016 at 11:28 AM, John Youn <john.y...@synopsys.com> wrote: >> On 3/10/2016 11:14 AM, John Youn wrote: >>> On 3/9/2016 11:06 AM, Doug Anderson wrote: >>>> Stefan, >>>&g

Re: [PATCH 1/2] usb: dwc3: core: Introduce dwc3_device_reinit()

2016-03-21 Thread John Youn
On 3/18/2016 12:17 PM, John Youn wrote: > On 3/16/2016 6:56 AM, Felipe Balbi wrote: >> >> heh, +john >> >> Felipe Balbi <ba...@kernel.org> writes: >>> [ text/plain ] >>> >>> Hi, >>> >>> Roger Quadros <rog...@ti.

Re: [RFT PATCH 2/2] Revert "usb: dwc2: Fix probe problem on bcm2835"

2016-03-19 Thread John Youn
On 3/10/2016 11:14 AM, John Youn wrote: > On 3/9/2016 11:06 AM, Doug Anderson wrote: >> Stefan, >> >> On Wed, Mar 9, 2016 at 11:01 AM, Stefan Wahren <stefan.wah...@i2se.com> >> wrote: >>> >>>> Doug Anderson <diand...@ch

Re: [PATCH 1/2] usb: dwc3: core: Introduce dwc3_device_reinit()

2016-03-19 Thread John Youn
On 3/16/2016 6:56 AM, Felipe Balbi wrote: > > heh, +john > > Felipe Balbi writes: >> [ text/plain ] >> >> Hi, >> >> Roger Quadros writes: >>> [ text/plain ] >>> We will need this function for a workaround. >>> The function issues a softreset only to the device

Re: [RFT PATCH 2/2] Revert "usb: dwc2: Fix probe problem on bcm2835"

2016-03-10 Thread John Youn
On 3/9/2016 11:06 AM, Doug Anderson wrote: > Stefan, > > On Wed, Mar 9, 2016 at 11:01 AM, Stefan Wahren wrote: >> >>> Doug Anderson hat am 7. März 2016 um 22:30 >>> geschrieben: >>> >>> >>> Stefan, >>> >>> On Mon, Mar 7, 2016 at 10:40 AM, Stefan

Re: Odd merge 3b30be3b6487 ("Merge tag 'v4.5-rc6' into next")

2016-03-04 Thread John Youn
On 3/4/2016 6:14 PM, Doug Anderson wrote: > Hi, > > On Fri, Mar 4, 2016 at 5:56 PM, John Youn <john.y...@synopsys.com> wrote: >> On 3/4/2016 5:04 PM, Doug Anderson wrote: >>> Felipe, >>> >>> Michael pointed out that there's an odd merge that

Re: [RFT PATCH 1/2] usb: dwc2: Add a 10 ms delay to dwc2_core_reset()

2016-03-04 Thread John Youn
On 3/4/2016 10:23 AM, Douglas Anderson wrote: > From testing and trying to make sense of the documentation, it appears > that a 10 ms delay is needed after resetting the core to make sure that > everything is stable and consistent. Let's add it. > > In my testing (on rk3288) this allows us to

Re: Odd merge 3b30be3b6487 ("Merge tag 'v4.5-rc6' into next")

2016-03-04 Thread John Youn
3b6487 ("Merge tag 'v4.5-rc6' into next") > > Specifically: > > $ git blame 3b30be3b6487 -- drivers/usb/dwc2/core.c | grep "This is required" > $ git blame 3b30be3b6487^2 -- drivers/usb/dwc2/core.c | grep "This is > required" > bd84f4ae9986a dr

Re: [PATCH] usb: dwc2: Add support for Lantiq ARX and XRX SoCs

2016-02-29 Thread John Youn
mpatible = "brcm,bcm2835-usb", .data = _bcm2835 }, > { .compatible = "hisilicon,hi6220-usb", .data = _hi6220 }, > { .compatible = "rockchip,rk3066-usb", .data = _rk3066 }, > + { .compatible = "lantiq,arx100-usb", .data = _ltq }, > + { .compatible =

[PATCH] Fix static analysis issues

2016-02-29 Thread John Youn
Hi Felipe, This can be applied to next after 4.5-rc6. Thanks, John John Youn (1): usb: dwc2: Fix issues in dwc2_complete_non_isoc_xfer_ddma() drivers/usb/dwc2/hcd_ddma.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) -- 2.6.3 -- To unsubscribe from this list: send the line

[PATCH] usb: dwc2: Fix issues in dwc2_complete_non_isoc_xfer_ddma()

2016-02-29 Thread John Youn
. Reported-by: Felipe Balbi <ba...@kernel.org> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers/usb/dwc2/hcd_ddma.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/usb/dwc2/hcd_ddma.c b/drivers/usb/dwc2/hcd_ddma.c index a41274a..c7

Re: [PATCH] usb: dwc2: Use kmem_cache_free()

2016-02-23 Thread John Youn
kmem_cache_free(desc_cache, qh->desc_list); > qh->desc_list = NULL; > return -ENOMEM; > } > Acked-by: John Youn <johny...@synopsys.com> 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: move usb_calc_bus_time into common code

2016-02-19 Thread John Youn
On 2/19/2016 2:48 PM, Doug Anderson wrote: > Hi, > > On Fri, Feb 19, 2016 at 1:52 PM, Alan Stern wrote: >> On Fri, 19 Feb 2016, Arnd Bergmann wrote: >> >>> The dwc2 dual-role USB controller driver has started calling >>> usb_calc_bus_time, and does so regardless of

[PATCH] usb: dwc3: Validate the maximum_speed parameter

2016-02-19 Thread John Youn
Check that dwc->maximum_speed is set to a valid value. Also add an error when we use it later if we encounter an invalid value. Signed-off-by: John Youn <johny...@synopsys.com> --- Hi Felipe, This patch depends on the previous SuperSpeed patches I sent. Let me know if you'd rathe

Re: [PATCH 19/19] usb: dwc3: Enable SuperSpeedPlus

2016-02-18 Thread John Youn
On 2/17/2016 10:39 PM, Felipe Balbi wrote: > John Youn <john.y...@synopsys.com> writes: >> On 2/17/2016 12:39 AM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> John Youn <john.y...@synopsys.com> writes: >>>> Enable SuperSpeedPlus

[PATCH v3 0/2] usb: dwc2: Fix host descriptor DMA issues

2016-02-17 Thread John Youn
This series contains two fixes for the host in Descriptor DMA mode. v3: * Added tested-bys * Minor rewrite of commit message (typos, grammar) v2: * Resend with proper e-mails Tang, Jianqiang (1): usb: dwc2: host: fix the data toggle error in full speed descriptor dma Vardan Mikayelyan

[PATCH v3 1/2] usb: dwc2: host: fix logical omissions in dwc2_process_non_isoc_desc

2016-02-17 Thread John Youn
rt the failure. Fixes: 26a19ea699060fde ("usb: dwc2: host: fix use of qtd after free in desc dma mode") Cc: Gregory Herrero <gregory.herr...@intel.com> Tested-by: Gregory Herrero <gregory.herr...@intel.com> Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com&g

[PATCH v3 2/2] usb: dwc2: host: fix the data toggle error in full speed descriptor dma

2016-02-17 Thread John Youn
From: Tang, Jianqiang <jianqiang.t...@intel.com> There will be a data toggle error for full speed bulk-out transfers. The data toggle bit is saved in the qh for non-control transfers, it is wrong to check the qtd in that case. John Youn: * Added WARN() to warn on improper

Re: [PATCH v3] usb: dwc3: Fix assignment of EP transfer resources

2016-02-17 Thread John Youn
On 2/17/2016 5:51 AM, B, Ravi wrote: > Hi John > > >> Fixes: aebda6187181 ("usb: dwc3: Reset the transfer resource index on >> SET_INTERFACE") >> Cc: <sta...@vger.kernel.org> # v3.2+ >> Reported-by: Ravi Babu <ravib...@ti.com> >> Sig

Re: [PATCH 19/19] usb: dwc3: Enable SuperSpeedPlus

2016-02-17 Thread John Youn
On 2/17/2016 12:39 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> Enable SuperSpeedPlus by programming the DCFG.speed and after >> enumerating, set gadget->speed appropriately. >> >> Signed-off-by: John Youn <jo

[PATCH v3] usb: dwc3: Fix assignment of EP transfer resources

2016-02-16 Thread John Youn
.2+ Reported-by: Ravi Babu <ravib...@ti.com> Signed-off-by: John Youn <johny...@synopsys.com> --- Hi Ravi, Could you verify that it works with your test scenario? Thanks, John v3: * Added comments * Removed unused variables * Formatting v2: * Simplified assignment of resources by d

[PATCH v2 0/2] usb: dwc2: Fix host descriptor DMA issues

2016-02-16 Thread John Youn
Sorry, messed up the emails. V2 is just a resend with e-mails fixed up. This series contains two fixes for the host in Descriptor DMA mode. v2: * Resend with proper e-mails Tang, Jianqiang (1): usb: dwc2: host: fix the data toggle error in full speed descriptor dma Vardan Mikayelyan (1):

[PATCH v2 2/2] usb: dwc2: host: fix the data toggle error in full speed descriptor dma

2016-02-16 Thread John Youn
toggle error. John Youn: * Added WARN() to warn on improper usage of the dwc2_hcd_save_data_toggle() function. Signed-off-by: Dyson Lee <dyson@intel.com> Signed-off-by: Tang, Jianqiang <jianqiang.t...@intel.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers

[PATCH v2 1/2] usb: dwc2: host: fix logical omissions in dwc2_process_non_isoc_desc

2016-02-16 Thread John Youn
rt the failure. Fixes: 26a19ea699060fde ("usb: dwc2: host: fix use of qtd after free in desc dma mode") Cc: Gregory Herrero <gregory.herr...@intel.com> Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers

[PATCH 1/2] usb: dwc2: host: fix logical omissions in dwc2_process_non_isoc_desc

2016-02-16 Thread John Youn
rt the failure. Fixes: 26a19ea699060fde ("usb: dwc2: host: fix use of qtd after free in desc dma mode") Cc: Gregory Herrero <gregory.herr...@intel.com> Signed-off-by: Vardan Mikayelyan <mvar...@synopsys.com> Signed-off-by: John Youn <johny...@synopsys.com> --- drivers

[PATCH 0/2] usb: dwc2: Fix host descriptor DMA issues

2016-02-16 Thread John Youn
This series contains two fixes for the host in Descriptor DMA mode. Tang, Jianqiang (1): usb: dwc2: host: fix the data toggle error in full speed descriptor dma Vardan Mikayelyan (1): usb: dwc2: host: fix logical omissions in dwc2_process_non_isoc_desc drivers/usb/dwc2/hcd_ddma.c | 23

Re: [PATCH v2] usb: dwc3: Fix assignment of EP transfer resources

2016-02-16 Thread John Youn
On 2/16/2016 1:28 PM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> The assignement of EP transfer resources was not handled properly in the >> dwc3 driver. Commit aebda6187181 ("usb: dwc3: Reset the transfer >> resource

Re: [PATCH] usb: dwc2: host: fix the data toggle error in full speed descriptor dma

2016-02-15 Thread John Youn
On 1/25/2016 10:20 PM, Jianqiang Tang wrote: > From: "Tang, Jianqiang" > > There will be data toggle error happen for full speed buld-out transfer. > The data toggle bit is saved in qh for non-control transfers, it is wrong > to check the qtd for that case. > > Also

[PATCH v2] usb: dwc3: Fix assignment of EP transfer resources

2016-02-15 Thread John Youn
b...@ti.com> Signed-off-by: John Youn <johny...@synopsys.com> --- Hi Ravi, This is a simplified version of the previous patch. Could you verify that it works with your test scenario? Thanks, John v2: * Simplified assignment of resources by doing all endpoints at once. drivers/usb/dwc3/core.

Re: [PATCH] usb: dwc3: Fix assignment of EP transfer resources

2016-02-15 Thread John Youn
On 2/12/2016 2:05 AM, Felipe Balbi wrote: > > Hi, > > John Youn <john.y...@synopsys.com> writes: >> On 2/10/2016 1:07 PM, Felipe Balbi wrote: >>> John Youn <john.y...@synopsys.com> writes: >>>>>> Basically assign all the resources i

[PATCH v2] usb: dwc2: Add extra delay when forcing dr_mode

2016-02-15 Thread John Youn
tions to set and clear force mode") Reported-by: Caesar Wang <caesar.upstr...@gmail.com> Reported-by: Michael Niewoehner <li...@mniewoehner.de> Tested-by: Caesar Wang <caesar.upstr...@gmail.com> Signed-off-by: John Youn <johny...@synopsys.com> --- Hi Felipe, This fixes a pr

Re: [PATCH 3/3] usb: dwc2: USB_DWC2 should depend on HAS_DMA

2016-02-15 Thread John Youn
ds on USB || USB_GADGET > help > Say Y here if your system has a Dual Role Hi-Speed USB > Acked-by: John Youn <johny...@synopsys.com> -- 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: Add extra delay when forcing dr_mode

2016-02-15 Thread John Youn
> > > Am 13.02.2016 um 22:13 schrieb Heiko Stuebner <he...@sntech.de>: > >> Am Donnerstag, 4. Februar 2016, 17:50:34 schrieb John Youn: >>> Fixes an issue found on rockchip rk3036-based SOC platforms. For some >>> reason, the existing msleep(25) is not

<    2   3   4   5   6   7   8   9   10   >