[PATCH] dwc2: gadget: Fix in control write transfers

2017-03-28 Thread Minas Harutyunyan
After data out stage gadget driver should not initate ZLP on control EP, because it is up to function driver. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drive

Re: Fwd: dwc2 and ping protocol

2017-03-15 Thread Minas Harutyunyan
Hi Nick, In DMA mode handling NAKs internally by hardware performing starting from core v2.71a. Before v2.71a handling NAKs should be performed by driver. Your core is 2.65a. Thanks, Minas On 3/11/2017 7:14 PM, Nick Hudson wrote: > Hi, > > I'm using a mostly unmodified older version of the

Re: dwc2_hc_chhltd_intr_dma - ChHltd set errors?

2017-04-04 Thread Minas Harutyunyan
Hi, On 4/4/2017 7:04 AM, John Stultz wrote: > On Mon, Apr 3, 2017 at 5:54 AM, Minas Harutyunyan > <minas.harutyun...@synopsys.com> wrote: >> On 4/3/2017 9:23 AM, John Youn wrote: >>> On 03/31/2017 04:04 PM, John Stultz wrote: >>>> On Thu, Mar 2,

Re: dwc2_hc_chhltd_intr_dma - ChHltd set errors?

2017-04-03 Thread Minas Harutyunyan
Hi, On 4/3/2017 9:23 AM, John Youn wrote: > On 03/31/2017 04:04 PM, John Stultz wrote: >> On Thu, Mar 2, 2017 at 12:00 PM, John Stultz wrote: >>> Hey John, >>> We've noticed that when using usb ethernet adapters on HiKey, we >>> occasionally see errors like: >>> >>>

Re: dwc2_hc_chhltd_intr_dma - ChHltd set errors?

2017-04-07 Thread Minas Harutyunyan
Hi, On 4/7/2017 12:18 PM, Felipe Balbi wrote: > > Hi, > > John Stultz writes: > > > wrote: >> On 4/4/2017 11:03 PM, John Stultz wrote: >>> >>> I did notice when cating the regdump

Re: dwc2_hc_chhltd_intr_dma - ChHltd set errors?

2017-04-05 Thread Minas Harutyunyan
Hi, On 4/4/2017 11:03 PM, John Stultz wrote: > On Tue, Apr 4, 2017 at 12:38 AM, Felipe Balbi > <felipe.ba...@linux.intel.com> wrote: >> >> Hi, >> >> Minas Harutyunyan <minas.harutyun...@synopsys.com> writes: >>>>>>>>

Re: dwc2_hc_chhltd_intr_dma - ChHltd set errors?

2017-04-06 Thread Minas Harutyunyan
On 4/6/2017 1:03 AM, John Stultz wrote: > > > On Wed, Apr 5, 2017 at 5:58 AM, Minas Harutyunyan > <minas.harutyun...@synopsys.com <mailto:minas.harutyun...@synopsys.com>> > wrote: >> On 4/4/2017 11:03 PM, John Stultz wrote: >>> >>> I did n

Re: [PATCH] dwc2: gadget: Fix in control write transfers

2017-04-02 Thread Minas Harutyunyan
Hi, On 3/30/2017 2:42 PM, Felipe Balbi wrote: > > Hi, > > Minas Harutyunyan <minas.harutyun...@synopsys.com> writes: >> After data out stage gadget driver should not initate ZLP on control EP, >> because it is up to function driver. > > not true always,

[PATCH] usb: dwc2: gadget: On USB RESET reset device address to zero

2017-07-11 Thread Minas Harutyunyan
Reseted DEVADDR field in DCFG to zero on USB RESET. Device address in DCFG register does not reset to zero, which required to pass enumeration, after disconnect and reconnect. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 3 +++ 1 file chan

Re: [PATCH] usb: dwc2: gadget: On disconnect reset device address to zero

2017-07-11 Thread Minas Harutyunyan
Hi Felipe, On 7/11/2017 11:34 AM, Felipe Balbi wrote: > > Hi, > > Minas Harutyunyan <minas.harutyun...@synopsys.com> writes: >>> Minas Harutyunyan <minas.harutyun...@synopsys.com> writes: >>>> USB CV driver stack doesn't perform USB RESET after devi

Re: [PATCH] usb: dwc2: gadget: On disconnect reset device address to zero

2017-07-10 Thread Minas Harutyunyan
Hi Filipe, On 7/10/2017 6:06 PM, Felipe Balbi wrote: > > Hi, > > Minas Harutyunyan <minas.harutyun...@synopsys.com> writes: >> USB CV driver stack doesn't perform USB RESET after device disconnect/ >> connect, so need to reset to zero DEVADDR field in DCF

Re: [PATCH] usb: dwc2: gadget: On disconnect reset device address to zero

2017-07-10 Thread Minas Harutyunyan
Hi Filipe, On 7/10/2017 6:14 PM, Felipe Balbi wrote: > > Hi again, > > Felipe Balbi <ba...@kernel.org> writes: >> Hi, >> >> Minas Harutyunyan <minas.harutyun...@synopsys.com> writes: >>> USB CV driver stack doesn't perform USB RESET after devic

[PATCH] usb: dwc2: Add safety check in setting of descriptor chain pointers

2017-06-30 Thread Minas Harutyunyan
interrupt asserting. In dwc2_hsotg_program_zlp() function dwc2_gadget_set_ep0_desc_chain() must be called only for EP0. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/gadg

[PATCH] usb: dwc2: gadget: Use ep->index in conext of FIFO registers

2017-06-29 Thread Minas Harutyunyan
It's reverting patch for commit "usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers". DTXFSTSn indexation based on EP number not TxFIFO number. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 5 ++--- 1 file changed,

Re: BUG: usb: dwc2: gadget: DTXFSTSn are actually endpoint indexed

2017-06-29 Thread Minas Harutyunyan
On 6/26/2017 9:55 PM, Jimmy Perchet wrote: > Hello, > > According to DWC2 databook( 3.20a in my case), DTXFSTSn registers are > indexed by endpoint number. This can be verified by comparing "fifo" and > "regdump" in debugfs (as long as the configuration is not trivial). > Therefore, in my humble

Re: incomplete MJPG frames through dwc2 USB host

2017-09-18 Thread Minas Harutyunyan
Hi Andrea, On 9/15/2017 1:34 PM, Andrea Di Chiara wrote: > Hi, > I'm using a RK3288 rockchip board whit kernel rockchip-linux release-4.4. > It has two USB host and one of them has a DW controller. If I connect a > UVC camera on it, I get into an incomplete MJPG frame error when enable > stream

Re: dwc2 - ChHltd set, but reason is unknown

2017-10-09 Thread Minas Harutyunyan
Hi Anders, On 10/9/2017 5:15 PM, Anders Montonen wrote: > Hi, > > We have a custom Altera Cyclone V SoCFPGA board, where connecting a > particular brand of USB memory sticks produces and enless stream of > console errors messages until it is removed from the system. > > On the board, the SoC has

Re: dwc2 - ChHltd set, but reason is unknown

2017-10-16 Thread Minas Harutyunyan
On 10/10/2017 4:35 PM, Anders Montonen wrote: > Hi, > > On Mon, 9 Oct 2017, Minas Harutyunyan wrote: >> On 10/9/2017 5:15 PM, Anders Montonen wrote: > >>> We have a custom Altera Cyclone V SoCFPGA board, where connecting a >>> particular brand of USB memo

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-10-16 Thread Minas Harutyunyan
On 10/12/2017 10:06 PM, John Stultz wrote: > On Thu, Oct 12, 2017 at 12:59 AM, Minas Harutyunyan > <minas.harutyun...@synopsys.com> wrote: >> >> 1. Vardan's patch fixing issue when dwc2 switched from host to device >> mode. It's allow to make functional dev

Re: dwc2 - ChHltd set, but reason is unknown

2017-10-16 Thread Minas Harutyunyan
On 10/16/2017 12:12 PM, Anders Montonen wrote: > On Mon, 16 Oct 2017, Minas Harutyunyan wrote: >> On 10/10/2017 4:35 PM, Anders Montonen wrote: >>> On Mon, 9 Oct 2017, Minas Harutyunyan wrote: >>>> On 10/9/2017 5:15 PM, Anders Montonen wrote: >>> >>

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-10-17 Thread Minas Harutyunyan
On 10/17/2017 1:34 AM, John Stultz wrote: > On Mon, Oct 16, 2017 at 1:36 AM, Minas Harutyunyan > <minas.harutyun...@synopsys.com> wrote: >> On b-plug disconnect should asserted GOTGINT.SesEndDet interrupt. >> According previously sent by you register dump (GHWCFG2 =

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-10-12 Thread Minas Harutyunyan
On 10/10/2017 1:50 AM, John Stultz wrote: > On Tue, Oct 3, 2017 at 2:58 AM, Minas Harutyunyan > <minas.harutyun...@synopsys.com> wrote: >> >> Could you please apply patch from Vardan Mikayelyan "usb: dwc2: Fix >> dwc2_hsotg_core_init_disconnected()

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-10-03 Thread Minas Harutyunyan
aro.org> >> Cc: Amit Pundir <amit.pun...@linaro.org> >> Cc: YongQin Liu <yongqin@linaro.org> >> Cc: John Youn <johny...@synopsys.com> >> Cc: Minas Harutyunyan <minas.harutyun...@synopsys.com> >> Cc: Douglas Anderson <diand...@chromium.

Re: [RESEND x2][PATCH 2/3] usb: dwc2: Error out of dwc2_hsotg_ep_disable() if we're in host mode

2017-10-03 Thread Minas Harutyunyan
connected usb devices > continue to function. > > I'm not sure if some other solution would be better here, but this seems > to work, so I wanted to send it out for input on what the right approach > should be. > > Cc: Wei Xu <xuw...@hisilicon.com> > Cc: Guodong Xu

Re: [RESEND x2][PATCH 3/3] usb: dwc2: Fix UDC state tracking

2017-10-03 Thread Minas Harutyunyan
Cc: YongQin Liu <yongqin....@linaro.org> > Cc: John Youn <johny...@synopsys.com> > Cc: Minas Harutyunyan <minas.harutyun...@synopsys.com> > Cc: Douglas Anderson <diand...@chromium.org> > Cc: Chen Yu <cheny...@huawei.com> > Cc: Felipe Balbi <felipe.ba...@l

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-10-19 Thread Minas Harutyunyan
On 10/17/2017 12:41 PM, Minas Harutyunyan wrote: > On 10/17/2017 1:34 AM, John Stultz wrote: >> On Mon, Oct 16, 2017 at 1:36 AM, Minas Harutyunyan >> <minas.harutyun...@synopsys.com> wrote: >>> On b-plug disconnect should asserted GOTGINT.SesEndDet interrupt. >&g

Re: dwc2 - ChHltd set, but reason is unknown

2017-10-19 Thread Minas Harutyunyan
On 10/16/2017 7:16 PM, Anders Montonen wrote: > On Mon, 16 Oct 2017, Minas Harutyunyan wrote: >> On 10/16/2017 12:12 PM, Anders Montonen wrote: >>> On Mon, 16 Oct 2017, Minas Harutyunyan wrote: >>>> On 10/10/2017 4:35 PM, Anders Montonen wrote: >>>>>

Re: [PATCH] usb: dwc2: disable erroneous overcurrent condition

2017-10-18 Thread Minas Harutyunyan
;> index a3ffe97..39e02cd 100644 >> --- a/drivers/usb/dwc2/params.c >> +++ b/drivers/usb/dwc2/params.c >> @@ -335,6 +335,9 @@ static void dwc2_get_device_properties(struct dwc2_hsotg >> *hsotg) >> num); >>

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-10-23 Thread Minas Harutyunyan
On 10/20/2017 3:57 PM, Minas Harutyunyan wrote: > On 10/20/2017 12:20 AM, John Stultz wrote: >> On Wed, Oct 18, 2017 at 11:46 PM, Minas Harutyunyan >> <minas.harutyun...@synopsys.com> wrote: >>> Could you please apply this patch. Please not apply your patch seri

Re: dwc2: usb: Unable to clear channel error

2017-10-23 Thread Minas Harutyunyan
On 10/19/2017 5:35 PM, Dinh Nguyen wrote: > > > On 10/19/2017 06:55 AM, Grigor Tovmasyan wrote: >> On 10/18/2017 6:07 PM, Marek Vasut wrote: >>> On 10/18/2017 04:05 PM, Dinh Nguyen wrote: Hi, I'm trying to bringup the DWC2 USB IP version 330A on a new Stratix10 SoC and have

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-10-24 Thread Minas Harutyunyan
On 10/24/2017 12:41 AM, John Stultz wrote: > On Mon, Oct 23, 2017 at 2:19 AM, Minas Harutyunyan > <minas.harutyun...@synopsys.com> wrote: >> Could you please verify on your setup follow patches: >> 1. Vardan's patch. >> 2. Patch for TOUTCAL programming (new version se

[PATCH] usb: dwc2: host: Setting TOUTCAL and USBTRDTIM fields in host mode

2017-10-24 Thread Minas Harutyunyan
values. It's allow fix issues with lot of transaction errors due to timeouts and turnarrounds on USB bus. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/hcd.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/hcd.c b/drive

Re: [PATCH 2/3 v2] usb: dwc2: Error out of dwc2_hsotg_ep_disable() if we're in host mode

2017-10-24 Thread Minas Harutyunyan
> Cc: Wei Xu <xuw...@hisilicon.com> > Cc: Guodong Xu <guodong...@linaro.org> > Cc: Amit Pundir <amit.pun...@linaro.org> > Cc: YongQin Liu <yongqin@linaro.org> > Cc: John Youn <johny...@synopsys.com> > Cc: Minas Harutyunyan <minas.harut

Re: [PATCH 3/3 v2] usb: dwc2: Fix UDC state tracking

2017-10-24 Thread Minas Harutyunyan
properly work. > > Cc: Wei Xu <xuw...@hisilicon.com> > Cc: Guodong Xu <guodong...@linaro.org> > Cc: Amit Pundir <amit.pun...@linaro.org> > Cc: YongQin Liu <yongqin@linaro.org> > Cc: John Youn <johny...@synopsys.com> > Cc: Minas Harutyun

Re: [PATCH 1/3 v2] usb: dwc2: Improve gadget state disconnection handling

2017-10-24 Thread Minas Harutyunyan
w...@hisilicon.com> > Cc: Guodong Xu <guodong...@linaro.org> > Cc: Amit Pundir <amit.pun...@linaro.org> > Cc: YongQin Liu <yongqin@linaro.org> > Cc: John Youn <johny...@synopsys.com> > Cc: Minas Harutyunyan <minas.harutyun...@synopsys.com> > Cc

Re: [PATCH] ARM: dts: bcm283x: Fix fifo size for EP 6,7

2017-11-27 Thread Minas Harutyunyan
Hi Stefan, On 11/23/2017 10:29 PM, Stefan Wahren wrote: > Hi Minas, > >> Minas Harutyunyan <minas.harutyun...@synopsys.com> hat am 23. November 2017 >> um 11:00 geschrieben: >> >> >> Hi Stefan, >> >> ... >> >> In addition to a

Re: [PATCH] ARM: dts: bcm283x: Fix fifo size for EP 6,7

2017-11-23 Thread Minas Harutyunyan
Hi Stefan, On 11/22/2017 6:15 PM, Stefan Wahren wrote: > Hi Minas, > >> Stefan Wahren <stefan.wah...@i2se.com> hat am 22. November 2017 um 12:21 >> geschrieben: >> >> >> Hi Minas, >> >>> Minas Harutyunyan <minas.harutyun...@syno

Re: [PATCH] usb: dwc2: gadget: fix dwc2_check_param_tx_fifo_sizes

2017-11-30 Thread Minas Harutyunyan
Hi Amelie, On 11/27/2017 6:42 PM, Amelie Delaunay wrote: > In case of OTG mode, with an OTG adapter plugged, the > dwc2_check_param_tx_fifo_sizes function reads DPTXFSIZN registers while > the controller is in Host mode, and, because DPTXFSIZN registers are > Device specific registers, the values

[PATCH] usb: dwc2: Fix TxFIFOn sizes and total TxFIFO size issues

2017-11-30 Thread Minas Harutyunyan
max in dwc2_hsotg_tx_fifo_total_depth() function. Also removed dwc2_hsotg_ep_info_size() function as no more need. Signed-off-by: Gevorg Sahakyan <sahak...@synopsys.com> Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/core.h | 4 drivers/usb/dwc

Re: [PATCH] ARM: dts: bcm283x: Fix fifo size for EP 6,7

2017-11-16 Thread Minas Harutyunyan
On 11/17/2017 2:35 AM, Stefan Wahren wrote: > Hi Eric, > >> Stefan Wahren hat am 31. Oktober 2017 um 09:43 >> geschrieben: >> >> >> Hi Eric, >> >>> Eric Anholt hat am 31. Oktober 2017 um 01:40 geschrieben: >>> >>> >>> Stefan Wahren

Re: [PATCH] ARM: dts: bcm283x: Fix fifo size for EP 6,7

2017-11-21 Thread Minas Harutyunyan
On 11/20/2017 4:48 PM, Stefan Wahren wrote: > Hi Minas, > > Am 20.11.2017 um 12:59 schrieb Minas Harutyunyan: >> Hi Stefan, >> Looks like I know cause of issue... but I'm overloaded today and will able >> to check it tomorrow. Sorry for delay. > > thanks

Re: [PATCH] usb: dwc2: host: fix isoc urb actual length

2017-11-06 Thread Minas Harutyunyan
Hi, On 11/6/2017 12:46 PM, William Wu wrote: > The actual_length in dwc2_hcd_urb structure is used > to indicate the total data length transferred so far, > but in dwc2_update_isoc_urb_state(), it just updates > the actual_length of isoc frame, and don't update the > urb actual_length at the same

Re: [PATCH] usb: dwc2: host: fix isoc urb actual length

2017-11-06 Thread Minas Harutyunyan
Hi William, On 11/6/2017 2:08 PM, wlf wrote: > Hi Minas, > > 在 2017年11月06日 17:28, Minas Harutyunyan 写道: >> Hi, >> >> On 11/6/2017 12:46 PM, William Wu wrote: >>> The actual_length in dwc2_hcd_urb structure is used >>> to indi

Re: [PATCH] USB: usbfs: compute urb->actual_length for isochronous

2017-11-09 Thread Minas Harutyunyan
by adding up > the lengths of the individual packets in an isochronous transfer. > > Signed-off-by: Alan Stern <st...@rowland.harvard.edu> > CC: Minas Harutyunyan <minas.harutyun...@synopsys.com> > Reported-and-tested-by: wlf <w...@rock-chips.com> > CC: <

Re: dwc2/dwc_otg drivers

2017-11-06 Thread Minas Harutyunyan
Hi Billy, On 11/6/2017 2:45 PM, Felipe Balbi wrote: > > Hi, > > (please, always Cc linux-usb) > > Billy Araujo writes: >> I saw your contact on Linkedin and it seems you are specialist USB drivers >> for Linux. I I am having an issue dwc2 driver generating lots of

[PATCH v2] usb: dwc2: Change TxFIFO and RxFIFO flushing flow

2017-12-08 Thread Minas Harutyunyan
Before flushing fifos required to check AHB master state and flush when AHB master is in IDLE state. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/core.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/usb/dwc2/co

[PATCH] usb: dwc2: host: Fix transaction errors in host mode

2017-12-11 Thread Minas Harutyunyan
time when switching to host mode required to set this field to correct value. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/hcd.c | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c

Re: [PATCH] usb: dwc2: host: Setting TOUTCAL and USBTRDTIM fields in host mode

2017-12-11 Thread Minas Harutyunyan
disconnected()) will be resetting to POR values >> after core soft reset applied. >> So, each time when switching to host mode required to set these fields >> to correct values. It's allow fix issues with lot of transaction errors >> due to timeouts and turnarround

Re: [PATCH] usb: dwc2: Change TxFIFO and RxFIFO flushing flow

2017-12-11 Thread Minas Harutyunyan
t;> flush when AHB master is in IDLE state. >>> >>> Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> >>> --- >>>drivers/usb/dwc2/core.c | 27 +++ >>>1 file changed, 27 insertions(+) >>> >>> diff --git

[PATCH] usb: dwc2: Change TxFIFO and RxFIFO flushing flow

2017-12-06 Thread Minas Harutyunyan
Before flushing fifos required to check AHB master state and flush when AHB master is in IDLE state. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/core.c | 27 +++ 1 file changed, 27 insertions(+) diff --git a/drivers/usb/dwc2/co

[PATCH] usb: dwc2: Add safety check for STSPHSERCVD intr

2017-12-06 Thread Minas Harutyunyan
STSPHSERCVD (status phase received) interrupt should be handled when EP0 is in DWC2_EP0_DATA_OUT state. Sometimes STSPHSERCVD interrupt asserted , when EP0 is not in DATA_OUT state. Spurios interrupt. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/gadget.

[PATCH v2] usb: dwc2: Add safety check in setting of descriptor chain pointers

2017-12-06 Thread Minas Harutyunyan
asserting. In dwc2_hsotg_program_zlp() function dwc2_gadget_set_ep0_desc_chain() must be called only for EP0. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/gadget.c b/d

[PATCH] usb: dwc2: hcd: Fix host channel halt flow

2017-12-06 Thread Minas Harutyunyan
According databook in Buffer and External DMA mode non-split periodic channels can't be halted. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/hcd.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/us

[PATCH] Revert "usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers"

2017-12-06 Thread Minas Harutyunyan
This reverts commit ad674a15249e7d800162858e49272877a782ec40 "usb: dwc2: gadget: use ep->fifo_index in context of FIFO registers". DTXFSTSn indexation based on EP number not TxFIFO number. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/gadget.

[PATCH] usb: dwc2: host: Setting TOUTCAL and USBTRDTIM fields in host mode

2017-12-06 Thread Minas Harutyunyan
values. It's allow fix issues with lot of transaction errors due to timeouts and turnarrounds on USB bus. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/hcd.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/hcd.c b/drive

Re: [PATCH] usb: dwc2: debugfs: Don't touch RX FIFO during register dump

2018-05-05 Thread Minas Harutyunyan
avoid this by omitting the relevant register. > > CC: Mian Yousaf Kaukab <yousaf.kau...@intel.com> > Fixes: 563cf017c443 ("usb: dwc2: debugfs: add support for complete register > dump") > Signed-off-by: Stefan Wahren <stefan.wah...@i2se.com> > --- Acked-by:

Re: dwc2 (on Meson8b) doesn't detect "hot-plugged" USB devices

2018-05-07 Thread Minas Harutyunyan
Hi Martin, On 5/7/2018 12:28 AM, Martin Blumenstingl wrote: > Hello, > > I was a bit surprised to see that hot-plugging USB devices on Amlogic > Meson8b (for example: Odroid-C1) is broken. > to be fair: I *think* it worked before, but I cannot guarantee it nor > can I say when it broke > > all

Re: [PATCH 1/4] usb: dwc2: Move dwc2_readl/writel functions after hsotg structure

2018-05-15 Thread Minas Harutyunyan
Hi Filipe, On 5/15/2018 11:19 AM, Felipe Balbi wrote: > Gevorg Sahakya writes: > >> From: Gevorg Sahakyan >> >> Moved dwc2_readl/writel functions after hsotg declaration for >> adding hsotg structure to dwc2_readl/writel function prototypes.

Re: [PATCH] usb: dwc2: Add Interpacket Gap(IPG) feature support

2018-05-15 Thread Minas Harutyunyan
Signed-off-by: Grigor Tovmasyan <tovma...@synopsys.com> > --- Acked-by: Minas Harutyunyan <hmi...@synopsys.com> > drivers/usb/dwc2/core.h| 11 +++ > drivers/usb/dwc2/debugfs.c | 1 + > drivers/usb/dwc2/gadget.c | 3 +++ > drivers/usb/dwc2/hw.h | 2

Re: [PATCH] usb: dwc2: Fix crash in incomplete isoc intr handlers.

2018-05-15 Thread Minas Harutyunyan
On 5/5/2018 12:30 PM, Artur Petrosyan wrote: > Crash caused by going out of "eps_out" array range. > Iteration on "eps_out" changed to less than "num_of_eps". > > Signed-off-by: Artur Petrosyan <art...@synopsys.com> > --- Acked-by: Minas Haru

Re: [PATCH] usb: dwc2: Change reading of current frame number flow.

2018-05-15 Thread Minas Harutyunyan
ccordingly updated dwc2_gadget_target_frame_elapsed() > function which uses stored frame_number instead of > reading frame number. > > In cases when target frame value is incremented > the frame_number is required to read again. > > Signed-off-by: Artur Petrosyan <art...@synops

Re: [PATCH v2] usb: dwc2: Fix kernel doc's warnings.

2018-05-15 Thread Minas Harutyunyan
Hi Filipe, Please pickup this patch to your testing/next. Thanks, Minas On 4/10/2018 9:59 AM, Minas Harutyunyan wrote: > Hi, > > On 4/3/2018 5:15 PM, Grigor Tovmasyan wrote: >> Added descriptions for all not described parameters. >> Fix all kernel doc's warnings. >&g

Re: [PATCH] usb: dwc2: gadget: Fix memory leak in dwc2_gadget_init()

2018-05-15 Thread Minas Harutyunyan
red function calls in gadget_init: moved up usb_add_gadget_udc() > before dwc2_hsotg_ep_alloc_request(). > > Tested using kmemleak. > > Cc: Stefan Wahren <stefan.wah...@i2se.com> > Signed-off-by: Grigor Tovmasyan <tovma...@synopsys.com> > --- Acked-by: Minas Harutyunyan &

Re: [PATCH] usb: dwc2: Fix HiKey regression caused by power_down feature

2018-05-22 Thread Minas Harutyunyan
Hi John, Please provide log with debug enabled configuration. On 5/21/2018 11:41 PM, John Stultz wrote: > On Mon, May 21, 2018 at 1:45 AM, Minas Harutyunyan > <minas.harutyun...@synopsys.com> wrote: >> Hi John, >> >> On 5/19/2018 4:49 AM, John Stultz wrote: >&

Re: [PATCH v2 0/4] usb: dwc2: Make dwc2 endianness agnostic

2018-05-23 Thread Minas Harutyunyan
Hi Filipe, This patch series changing dwc2_readl/dwc2_writel functions prototypes. To avoid multiple re-basing, preferable to merge this series to your next branch as soon as possible. Do you have any objections? Thanks, Minas Acked-by: Minas Harutyunyan <hmi...@synopsys.com> On 5/2

[PATCH] dwc2: gadget: Fix ISOC IN DDMA PID bitfield value calculation

2018-05-23 Thread Minas Harutyunyan
PID bitfield in descriptor should be set based on particular request length, not based on EP's mc value. PID value can't be set to 0 even request length is 0. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 7 ++- 1 file changed, 6 insertions

Re: [PATCH] usb: gadget: dwc2: fix memory leak in gadget_init()

2018-05-25 Thread Minas Harutyunyan
Acked-by: Minas Harutyunyan <hmi...@synopsys.com> On 5/24/2018 6:22 PM, Grigor Tovmasyan wrote: > Freed allocated request for ep0 to prevent memory leak in case when > dwc2_driver_probe() failed. > > Signed-off-by: Grigor Tovmasyan <tovma...@synopsys.com> > Cc

[PATCH] usb: dwc2: gadget: ISOC's starting flow improvement

2018-05-24 Thread Minas Harutyunyan
e number flow" reading of current frame number done ASAP in common interrupt handler. This frame number stored in frame_number variable which used as starting frame number for ISOC EP's in above mentioned handlers. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb

Re: [PATCH v3] usb: dwc2: Fix kernel doc's warnings.

2018-05-16 Thread Minas Harutyunyan
On 5/16/2018 12:04 PM, Grigor Tovmasyan wrote: > Added descriptions for all not described parameters. > Fix all kernel doc's warnings. > > Signed-off-by: Grigor Tovmasyan <tovma...@synopsys.com> > --- Acked-by: Minas Harutyunyan <hmi...@synopsys.com> > driv

Re: [PATCH] usb: dwc2: Fix HiKey regression caused by power_down feature

2018-05-21 Thread Minas Harutyunyan
Hi John, On 5/19/2018 4:49 AM, John Stultz wrote: > In 4.17-rc, commit 03ea6d6e9e1f ("usb: dwc2: Enable power down") > caused the HiKey board to not correctly handle switching between > usb-gadget and usb-host mode. > > Unplugging the OTG port would result in: > [ 42.240973] dwc2 f72c.usb:

[PATCH] usb: dwc2: gadget: fix packet drop issue for ISOC OUT transfers

2018-06-12 Thread Minas Harutyunyan
In ISOC OUT transfer, when the OUT token received while EP disabled, we shouldn't complete a usb request. The current flow completed one usb request, this will lead to a packet drop to function driver. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 2 -- 1 file changed, 2

[PATCH] usb: dwc2: gadget: Fix issue in dwc2_gadget_start_isoc()

2018-06-12 Thread Minas Harutyunyan
In case of requests queue is empty reset EP target_frame to initial value. This allow restarting ISOC traffic in case when function driver queued requests with interruptions. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 1 + 1 file changed, 1 insertion(+) diff --git

Re: [PATCH] usb: dwc2: Fix host exit from hibernation flow.

2018-05-31 Thread Minas Harutyunyan
Acked-by: Minas Harutyunyan On 5/23/2018 5:25 PM, Artur Petrosyan wrote: > In case when a hub is connected to DWC2 host > auto suspend occurs and host goes to > hibernation. When any device connected to hub > host hibernation exiting incorrectly. > > - Added dwc2_hcd_rem_wake

[PATCH v1] dwc2: gadget: Fix ISOC IN DDMA PID bitfield value calculation

2018-05-30 Thread Minas Harutyunyan
PID bitfield in descriptor should be set based on particular request length, not based on EP's mc value. PID value can't be set to 0 even request length is 0. If request length is 0 then SP bit should be set along PID. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 15

[PATCH v2] dwc2: gadget: Fix ISOC IN DDMA PID bitfield value calculation

2018-05-30 Thread Minas Harutyunyan
PID bitfield in descriptor should be set based on particular request length, not based on EP's mc value. PID value can't be set to 0 even request length is 0. If request length is 0 then SP bit should be set along PID. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 15

Re: Kernel Oops when downloading data from a 4G modem connected via USB

2018-05-02 Thread Minas Harutyunyan
Hi, On 4/29/2018 4:44 PM, Amr Bekhit wrote: > Hello, > > We're working with an embedded system that uses the RK3188 SoC and has a > Quectel EC25 4G modem connected via USB. We're using Buildroot 2018.02.1 to > compile the kernel (4.15.16 using the radxarock_defconfig) and root file > system. The

Re: dwc2: enumeration issue with audio dongle connected to USB hub

2018-05-02 Thread Minas Harutyunyan
Hi, On 4/27/2018 10:03 AM, Stefan Wahren wrote: > Hi, > during my tests with a Raspberry Pi 2 B with an C-Media audio dongle > connected to a powered USB hub, i noticed the enumeration errors below (the > device gets finally ernumerated). I tested yesterdays linux-next, 4.17-rc2 > and 4.14 but

[PATCH] usb: dwc2: Enable BNA interrupt for IN endpoints

2018-05-03 Thread Minas Harutyunyan
In DDMA mode required to enable BNA interrupt for both directions. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/gadget.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 6c32bf

[PATCH] usb: dwc2: Change ISOC DDMA flow

2018-05-03 Thread Minas Harutyunyan
. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/core.h | 4 +- drivers/usb/dwc2/gadget.c | 279 +++--- 2 files changed, 139 insertions(+), 144 deletions(-) diff --git a/drivers/usb/dwc2/core.h b/drivers/usb/dwc2/

Re: Kernel Oops when downloading data from a 4G modem connected via USB

2018-05-03 Thread Minas Harutyunyan
Hi Amr, On 5/2/2018 3:57 PM, Amr Bekhit wrote: >> Could you please apply follow patches from linux-usb mailing list: >> 1. usb: dwc2: hcd: Fix host channel halt flow >> 2. usb: dwc2: host: Fix transaction errors in host mode >> and test again. > > Thanks for your response. I've tried applying

Re: dwc2 - ChHltd set, but reason is unknown

2017-10-20 Thread Minas Harutyunyan
On 10/19/2017 2:22 PM, Anders Montonen wrote: > On Thu, 19 Oct 2017, Minas Harutyunyan wrote: > >> Could you please apply this patch. >> If you confirm that this patch fix your issue with "Transaction Error" >> and " ChHltd set, but reason is unkn

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-10-20 Thread Minas Harutyunyan
Hi John Stultz, On 10/20/2017 12:06 AM, John Stultz wrote: > On Tue, Oct 17, 2017 at 1:41 AM, Minas Harutyunyan > <minas.harutyun...@synopsys.com> wrote: >> On 10/17/2017 1:34 AM, John Stultz wrote: >>> On Mon, Oct 16, 2017 at 1:36 AM, Minas Harutyunyan >>> &l

Re: [RESEND x2][PATCH 0/3] dwc2 fixes for edge cases on hikey

2017-10-20 Thread Minas Harutyunyan
On 10/20/2017 12:20 AM, John Stultz wrote: > On Wed, Oct 18, 2017 at 11:46 PM, Minas Harutyunyan > <minas.harutyun...@synopsys.com> wrote: >> Could you please apply this patch. Please not apply your patch series >> "[PATCH 0/3] dwc2 fixes for edge cases on hik

Re: dwc2: usb: Unable to clear channel error

2017-10-27 Thread Minas Harutyunyan
On 10/24/2017 3:23 AM, Dinh Nguyen wrote: > > > On 10/23/2017 09:03 AM, Minas Harutyunyan wrote: >> On 10/19/2017 5:35 PM, Dinh Nguyen wrote: >>> >>> >>> On 10/19/2017 06:55 AM, Grigor Tovmasyan wrote: >>>> On 10/18/2017 6:07 PM, Marek Vasut

Re: [PATCH v3 00/49] usb: dwc2: fixes, enhancements and new features

2017-12-29 Thread Minas Harutyunyan
Hi Stefan, Currently our team on New Year and Christmas Holidays till January 7, so our responses can be delayed. On 12/27/2017 12:38 AM, Stefan Wahren wrote: > Hi Grigor, > >> Grigor Tovmasyan hat am 26. Dezember 2017 um >> 12:21 geschrieben: >> >> >> This

Re: [PATCH v3 03/49] usb: dwc2: Remove version check in GSNPSID

2017-12-29 Thread Minas Harutyunyan
Hi Greg, On 12/29/2017 8:59 PM, Greg KH wrote: > On Tue, Dec 26, 2017 at 03:22:05PM +0400, Grigor Tovmasyan wrote: >> From: Gevorg Sahakyan >> >> Only check the ID portion of the GSNPSID register and don’t check >> the version. This will allow the driver to work with

Re: [PATCH v3 00/49] usb: dwc2: fixes, enhancements and new features

2018-01-08 Thread Minas Harutyunyan
Hi Stefan, On 12/31/2017 9:19 PM, Stefan Wahren wrote: > Hi Grigor, > > sorry for misusing the cover letter for my comments, but i didn't received > all patches. > >> Grigor Tovmasyan <grigor.tovmas...@synopsys.com> hat am 26. Dezember 2017 um >> 12:21 geschri

Re: High CPU load produced by USB (DW2)

2018-02-08 Thread Minas Harutyunyan
On 2/7/2018 6:28 PM, gregkh wrote: > On Wed, Feb 07, 2018 at 10:48:57AM +0100, Mirza Krak wrote: >> Hi. >> >> I initially started a thread on a different mailing list [1], and you >> can take look there for some additional background. >> >> I am using a 4.14.15 stable kernel on a RK3288 SoC

Re: High CPU load produced by USB (DW2)

2018-02-14 Thread Minas Harutyunyan
On 2/14/2018 12:57 PM, Mirza Krak wrote: > On 8 February 2018 at 14:53, Minas Harutyunyan > <minas.harutyun...@synopsys.com> wrote: >> On 2/8/2018 5:07 PM, Mirza Krak wrote: >>> On 8 February 2018 at 12:02, Minas Harutyunyan >>> <minas.harutyun...@synopsys.co

Re: High CPU load produced by USB (DW2)

2018-02-08 Thread Minas Harutyunyan
On 2/8/2018 5:07 PM, Mirza Krak wrote: > On 8 February 2018 at 12:02, Minas Harutyunyan > <minas.harutyun...@synopsys.com> wrote: >> Hi Mirza, >> >> On 2/7/2018 1:49 PM, Mirza Krak wrote: > > < snip > > >> >> Could you please provide add

Re: High CPU load produced by USB (DW2)

2018-02-08 Thread Minas Harutyunyan
Hi Mirza, On 2/7/2018 1:49 PM, Mirza Krak wrote: > Hi. > > I initially started a thread on a different mailing list [1], and you > can take look there for some additional background. > > I am using a 4.14.15 stable kernel on a RK3288 SoC (FireFly RK3288 > board) which uses the DW2 USB core. I

Re: High CPU load produced by USB (DW2)

2018-02-15 Thread Minas Harutyunyan
On 2/15/2018 5:20 PM, Mirza Krak wrote: > On 14 February 2018 at 13:07, Minas Harutyunyan > <minas.harutyun...@synopsys.com> wrote: >> On 2/14/2018 12:57 PM, Mirza Krak wrote: >>> On 8 February 2018 at 14:53, Minas Harutyunyan >>> <minas.harutyun...@synops

Re: High CPU load produced by USB (DW2)

2018-02-19 Thread Minas Harutyunyan
On 2/19/2018 9:03 PM, Marek Vasut wrote: > On 02/19/2018 11:11 AM, Minas Harutyunyan wrote: >> On 2/19/2018 12:51 PM, Marek Vasut wrote: >>> On 02/19/2018 09:19 AM, Minas Harutyunyan wrote: >>>> On 2/17/2018 12:07 AM, Marek Vasut wrote: >>>>> On

Re: High CPU load produced by USB (DW2)

2018-02-19 Thread Minas Harutyunyan
On 2/17/2018 12:07 AM, Marek Vasut wrote: > On 02/16/2018 06:59 AM, Minas Harutyunyan wrote: >> On 2/15/2018 5:20 PM, Mirza Krak wrote: >>> On 14 February 2018 at 13:07, Minas Harutyunyan >>> <minas.harutyun...@synopsys.com> wrote: >>>> On 2/14/2018 12

Re: High CPU load produced by USB (DW2)

2018-02-19 Thread Minas Harutyunyan
On 2/19/2018 12:51 PM, Marek Vasut wrote: > On 02/19/2018 09:19 AM, Minas Harutyunyan wrote: >> On 2/17/2018 12:07 AM, Marek Vasut wrote: >>> On 02/16/2018 06:59 AM, Minas Harutyunyan wrote: >>>> On 2/15/2018 5:20 PM, Mirza Krak wrote: >>>>> On

Re: dwc2: scatter-gather support?

2018-07-30 Thread Minas Harutyunyan
Hi Stefan, On 7/29/2018 12:33 PM, Stefan Wahren wrote: > Hi, > > if i connect a UAS capable storage device to the Raspberry Pi, i'm getting > the following output on 4.18rc: > > The driver for the USB controller dwc2_hsotg does not support > scatter-gather which is > required

[PATCH] usb: dwc2: gadget: ISOC's starting flow improvement

2018-07-27 Thread Minas Harutyunyan
e number flow" reading of current frame number done ASAP in common interrupt handler. This frame number stored in frame_number variable which used as starting frame number for ISOC EP's in above mentioned handlers. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 19 -

Re: [PATCH] usb: dwc2: gadget: ISOC's starting flow improvement

2018-07-26 Thread Minas Harutyunyan
Hi Felipe, This patch should be applied after follow patch from Artur Petrosyan: "[PATCH] usb: dwc2: Change reading of current frame number flow." Thanks, Minas On 7/26/2018 2:45 PM, Felipe Balbi wrote: > Minas Harutyunyan writes: > >> To start ISOC

Re: Possible race condition in f_mass_storage gadget during deinitialization. Kernel warning issued

2018-09-06 Thread Minas Harutyunyan
Hi Adrian, On 8/20/2018 4:34 PM, Adrian Ambrożewicz wrote: > In my current workspace the kernel used is 4.17.7 . > > Unfortunately I don't have the resources now to verify with newer > version but I might look into that later if it's necessary. I've only > compared source code between my

Re: High CPU load produced by USB (DW2)

2018-03-12 Thread Minas Harutyunyan
Hi Paul, Nice to hear you again! Hope you are doing well. On 3/8/2018 1:51 PM, Paul Zimmerman wrote: > On 03/06/2018 09:09 AM, Minas Harutyunyan wrote: >> Hi, >> >> On 3/6/2018 10:45 AM, Minas Harutyunyan wrote: >>> Hi, >>> >>> On 3/5/2018 11:14

  1   2   >