Re: WARNING: CPU: 0 PID: 0 at ../drivers/usb/dwc2/gadget.c:300 dwc2_hsotg_init_fifo+0x34/0x1b4

2018-11-06 Thread Minas Harutyunyan
Hi Maynard, On 11/7/2018 2:07 AM, Maynard CABIENTE wrote: > Hi John, > > Sorry re-sending as it was detected as spam before (due to HTML subpart). > > I’m not certain if you are the correct person that maintains the > drivers/usb/dwc2 for Linux kernel 4.14. I noticed that 4.20 is a different

[PATCH] usb: dwc2: Fix ep disable spinlock flow.

2018-11-04 Thread Minas Harutyunyan
Changed spinlock flow to fix smatch warnings. Fixes: dccf1bad4be7 ("usb: dwc2: Disable all EP's on disconnect") Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/driver

Re: [RESEND PATCH v2] usb: dwc2: disable power_down on rockchip for regression

2018-10-31 Thread Minas Harutyunyan
f9aca7f3c03cb8d96eb6 > > Signed-off-by: Hal Emmerich > Acked-by: Minas Harutyunyan Acked-by: Minas Harutyunyan for v2 > --- > drivers/usb/dwc2/params.c | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c >

Re: [RESEND PATCH v2] usb: dwc2: disable power_down on rockchip for regression

2018-10-29 Thread Minas Harutyunyan
is non-zero by default, it needs to be set >  to 0 for rockchip devices to restore functionality. > >  This bug was reported in the linux-usb thread: >  REGRESSION: usb: dwc2: USB device not seen after boot > >  The commit that caused this regression is: >  6d23ee9caa6790aea047

Re: [PATCH] usb: dwc2: pci: Fix an error code in probe

2018-10-18 Thread Minas Harutyunyan
On 10/18/2018 11:37 AM, Dan Carpenter wrote: > We added some error handling to this function but forgot to set the > error code on this path. > > Fixes: ecd29dabb2ba ("usb: dwc2: pci: Handle error cleanup in probe") > Signed-off-by: Dan Carpenter Acked-by: Minas Haruty

Re: [PATCH] usb: dwc2: disable power_down on rockchip devices

2018-09-30 Thread Minas Harutyunyan
efault, it needs to be set >  to 0 for rockchip devices to restore functionality. > >  This bug was reported in the linux-usb thread: >  REGRESSION: usb: dwc2: USB device not seen after boot > >  The commit that caused this regression is: >  6d23ee9caa6790aea047f9aca7f3c03cb8

Re: [PATCH] usb: dwc2: disable power_down on rockchip devices

2018-09-28 Thread Minas Harutyunyan
efault, it needs to be set >  to 0 for rockchip devices to restore functionality. > >  This bug was reported in the linux-usb thread: >  REGRESSION: usb: dwc2: USB device not seen after boot > >  The commit that caused this regression is: >  6d23ee9caa6790aea047f9aca7f3c03cb8

Re: [PATCH] usb: dwc2: Disable all EP's on disconnect

2018-09-20 Thread Minas Harutyunyan
Hi Dan, On 9/20/2018 1:49 PM, Dan Carpenter wrote: > is is obviously deliberate that we drop the other thread's lock and > then take it ourselves. But I don't think that can be right at all. > How do we know that it's safe for the other thread to drop the lock? > > There should at least be a

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

2018-09-19 Thread Minas Harutyunyan
Hi Adrian, On 9/18/2018 6:21 PM, Minas Harutyunyan wrote: > Hi Adrian, > > On 9/10/2018 11:54 AM, Adrian Ambrożewicz wrote: >> Thanks for the patch. I was happy to blindly apply it on my sources and >> check the result. Unfortunately it ended up with even worse crash than

[PATCH v2] usb: dwc2: Disable all EP's on disconnect

2018-09-19 Thread Minas Harutyunyan
version 1: Changed lock acquire flow in dwc2_hsotg_ep_disable() function. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index

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

2018-09-18 Thread Minas Harutyunyan
ng this adjustment it looks like originally reported warning > is gone. > > I will be happy to test another version of the patch if you find it > necessary to pursue that way. > > Regards, > Adrian > > czw., 6 wrz 2018 o 14:22 użytkownik Minas Harutyunyan > mailto:m

[PATCH] usb: dwc2: Disable all EP's on disconnect

2018-09-18 Thread Minas Harutyunyan
. In dwc2_hsotg_ep_disable() function before locking hsotg->lock, check if it locked by calling functions then unlock. Lock again on exit if it was locked. Same lock checking flow added to dwc2_hsotg_udc_stop() function. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c |

Re: [PATCH] usb: dwc2: disable power_down on rockchip devices

2018-09-13 Thread Minas Harutyunyan
; >  } > >  static void dwc2_set_ltq_params(struct dwc2_hsotg *hsotg) > -- > 2.11.0 > -- > 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 > Acked-by: Minas Harutyunyan

Re: [PATCH] usb: dwc2: disable power_down on rockchip devices

2018-09-13 Thread Minas Harutyunyan
Hi, On 9/12/2018 7:21 PM, Urja Rannikko wrote: > Hi, ping? > > I just accidentally managed to replicate the work done here, though my > identification of the likely breaking commit was: > 03ea6d6e9e1ff1b0222eb723eee5990d3511cc4d ("usb: dwc2: Enable power down") > > If someone is wondering what

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: [PATCH 0/9] usb: dwc2: device: Add service interval support

2018-09-03 Thread Minas Harutyunyan
Add handler for WkupAlert interrupt > > drivers/usb/dwc2/core.h| 29 +++ > drivers/usb/dwc2/debugfs.c | 1 + > drivers/usb/dwc2/gadget.c | 91 > ++ > drivers/usb/dwc2/hw.h | 15 > drivers/usb/dwc2/params.c | 6 +++ > 5 files changed, 142 insertions(+) > Acked-by: Minas Harutyunyan

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

[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

[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

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

[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

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

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

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

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

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

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: [PATCH v2 0/3] usb: dwc2: gadget: Update ISOC DDMA flow.

2018-04-20 Thread Minas Harutyunyan
Hi Filipe, On 3/29/2018 6:28 PM, Minas Harutyunyan wrote: > This series fully update existing ISOC DDMA flow which initially based on > 2 descriptor chains. Switching between desc chains performing based on BNA > interrupt. Because of BNA interrupt few packets can be lost. > > 1

Re: dwc2 ff540000.usb: dwc2_hc_chhltd_intr_dma: Channel 11 - ChHltd set, but reason is unknown

2018-04-17 Thread Minas Harutyunyan
Hi Rodrigo, On 4/16/2018 7:27 PM, Rodrigo Stuffs wrote: > Hi there Minas / linux-usb ; > > I have a good ole APC Back-UPS ES 600N that from time to time resolves > that it should stop talking to my SBCs. > > This issue happened in my Raspberry Pi, and when it stopped I had the > following

Re: [PATCH v1 0/2] usb: dwc2: gadget: Fixes for LPM

2018-04-16 Thread Minas Harutyunyan
ms.c | 8 > 2 files changed, 5 insertions(+), 5 deletions(-) > Acked-by: Minas Harutyunyan <hmi...@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 v4] usb: dwc2: dwc2_vbus_supply_init: fix error check

2018-04-11 Thread Minas Harutyunyan
Hi Heiko, On 4/10/2018 7:37 PM, Heiko Stübner wrote: > Am Dienstag, 10. April 2018, 15:52:25 CEST schrieb Minas Harutyunyan: >> Hi Heiko, >> >> On 4/10/2018 4:28 PM, Heiko Stuebner wrote: >>> Am Montag, 26. März 2018, 11:00:01 CEST schrieb Tomeu Vizoso: >>&g

Re: [PATCH v4] usb: dwc2: dwc2_vbus_supply_init: fix error check

2018-04-10 Thread Minas Harutyunyan
Hi Heiko, On 4/10/2018 4:28 PM, Heiko Stuebner wrote: > Am Montag, 26. März 2018, 11:00:01 CEST schrieb Tomeu Vizoso: >> devm_regulator_get_optional returns -ENODEV if the regulator isn't >> there, so if that's the case we have to make sure not to leave -ENODEV >> in the regulator pointer. >> >>

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-04-10 Thread Minas Harutyunyan
Hi Filipe, On 3/19/2018 5:53 PM, Minas Harutyunyan wrote: > Hi, > > On 3/19/2018 3:36 PM, Minas Harutyunyan wrote: >> Hi, >> >> On 3/19/2018 12:55 PM, Felipe Balbi wrote: >>> >>> Hi, >>> >>> Minas Harutyunyan <minas.harutyun...

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

2018-04-10 Thread Minas Harutyunyan
; - * @work: Pointer to a qh unreserve_work. > + * @t: Address to a qh unreserve_work. >*/ > static void dwc2_unreserve_timer_fn(struct timer_list *t) > { > @@ -1631,7 +1632,7 @@ static void dwc2_qh_init(struct dwc2_hsotg *hsotg, > struct dwc2_qh *qh, >* @hsotg:T

Re: [PATCH v4] usb: dwc2: dwc2_vbus_supply_init: fix error check

2018-04-05 Thread Minas Harutyunyan
sotg->vbus_supply)) { >> +ret = PTR_ERR(hsotg->vbus_supply); >> +hsotg->vbus_supply = NULL; >> +return ret == -ENODEV ? 0 : ret; >> +} >> >> return regulator_enable(hsotg->vbus_supply); >>} >> @@

Re: [PATCH v4] usb: dwc2: dwc2_vbus_supply_init: fix error check

2018-04-05 Thread Minas Harutyunyan
Hi Tomeu, On 3/26/2018 1:01 PM, Tomeu Vizoso wrote: > devm_regulator_get_optional returns -ENODEV if the regulator isn't > there, so if that's the case we have to make sure not to leave -ENODEV > in the regulator pointer. > > Also, make sure we return 0 in that case, but correctly propagate any

Re: [PATCH -next] usb: dwc2: pci: Fix error return code in dwc2_pci_probe()

2018-04-04 Thread Minas Harutyunyan
i: Handle error cleanup in probe") >> Signed-off-by: Wei Yongjun <weiyongj...@huawei.com> > > Reviewed-by: Grigor Tovmasyan <tovma...@synopsys.com> Acked-by: Minas Harutyunyan <hmi...@synopsys.com> > >> --- >>drivers/usb/dwc2/pci.c | 4 +++- >&g

[PATCH v2 3/3] usb: dwc2: Add High Bandwidth ISOC OUT support

2018-03-29 Thread Minas Harutyunyan
transfers. In function dwc2_hsotg_ep_enable() desc chain allocation/ deallocation increased by mult times. Added bInterval limit checking for HB ISOC OUT because on completion frame number from desc used to check frame elapsed or no. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.

[PATCH v2 2/3] usb: dwc2: Change ISOC DDMA flow

2018-03-29 Thread Minas Harutyunyan
. In dwc2_hsotg_ep_enable() function added sanity check of bInterval for ISOC IN in DDMA mode, because HW not supported EP's with bInterval more than 12. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/core.h | 2 - drivers/usb/dwc2/gadget.c

[PATCH v2 0/3] usb: dwc2: gadget: Update ISOC DDMA flow.

2018-03-29 Thread Minas Harutyunyan
status codes to 0 instead of error codes (ENODATA, EIO, ETIMEDOUT). In case of errors, set request actual length to 0, to keep consistency with original code. Changes from version 0: Fix kbuild test robot warnings on idents. Minas Harutyunyan (3): usb: dwc2: Enable BNA interrupt for IN endpoints

[PATCH v2 1/3] usb: dwc2: Enable BNA interrupt for IN endpoints

2018-03-29 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

Re: [PATCH v1 0/3] usb: dwc2: gadget: Update ISOC DDMA flow.

2018-03-22 Thread Minas Harutyunyan
Hi Filipe, On 3/22/2018 1:05 PM, Felipe Balbi wrote: > Minas Harutyunyan <minas.harutyun...@synopsys.com> writes: > >> Hi Filipe, >> >> On 3/17/2018 1:08 PM, Minas Harutyunyan wrote: >>> This series fully update existing ISOC DDMA flow which initially base

Re: [PATCH v1 2/3] usb: dwc2: Change ISOC DDMA flow

2018-03-22 Thread Minas Harutyunyan
Hi Zengtao, On 3/22/2018 1:36 PM, Zengtao (B) wrote: > Hi Minas: > >> -Original Message----- >> From: Minas Harutyunyan [mailto:minas.harutyun...@synopsys.com] >> Sent: Thursday, March 22, 2018 4:06 PM >> To: Zengtao (B) <prime.z...@hisilicon.com>;

Re: [PATCH v1 2/3] usb: dwc2: Change ISOC DDMA flow

2018-03-22 Thread Minas Harutyunyan
Hi Zengtao, On 3/21/2018 2:45 PM, Zengtao (B) wrote: > Hi Minas: > >> -Original Message----- >> From: Minas Harutyunyan [mailto:minas.harutyun...@synopsys.com] >> Sent: Wednesday, March 21, 2018 4:08 PM >> To: Zengtao (B) <prime.z...@hisilicon.com>;

Re: [PATCH v1 0/3] usb: dwc2: gadget: Update ISOC DDMA flow.

2018-03-21 Thread Minas Harutyunyan
Hi Filipe, On 3/17/2018 1:08 PM, Minas Harutyunyan wrote: > This series fully update existing ISOC DDMA flow which initially based on > 2 descriptor chains. Switching between desc chains performing based on BNA > interrupt. Because of BNA interrupt few packets can be lost. > > 1

Re: [PATCH v1 2/3] usb: dwc2: Change ISOC DDMA flow

2018-03-21 Thread Minas Harutyunyan
Hi Zengtao, On 3/21/2018 6:17 AM, Zengtao (B) wrote: >> -Original Message- > >> From: linux-usb-ow...@vger.kernel.org > >> [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Minas Harutyunyan > >> Sent: Tuesday, March 20, 2018 10:40 PM > >>

Re: [PATCH v1 2/3] usb: dwc2: Change ISOC DDMA flow

2018-03-20 Thread Minas Harutyunyan
Hi Zengtao, On 3/20/2018 6:01 AM, Zengtao (B) wrote: > Hi Minas: > > > > A few minor comments: > > > >> -Original Message- > >> From: linux-usb-ow...@vger.kernel.org > >> [mailto:linux-usb-ow...@vger.kernel.org] On Behalf Of Minas Ha

Re: [PATCH] MAINTAINERS: Update maintainer for dwc2

2018-03-20 Thread Minas Harutyunyan
On 3/20/2018 10:34 AM, Greg Kroah-Hartman wrote: > On Mon, Mar 19, 2018 at 01:06:02PM -0700, John Youn wrote: >> Update to show Minas Harutyunyan as the new maintainer for dwc2. >> >> Signed-off-by: John Youn <johny...@synopsys.com> >> --- >> MAINTAINERS

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-19 Thread Minas Harutyunyan
Hi, On 3/19/2018 3:36 PM, Minas Harutyunyan wrote: > Hi, > > On 3/19/2018 12:55 PM, Felipe Balbi wrote: >> >> Hi, >> >> Minas Harutyunyan <minas.harutyun...@synopsys.com> writes: >>>>>>>> Thanks for picking this for -next. >>

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-19 Thread Minas Harutyunyan
Hi, On 3/19/2018 12:55 PM, Felipe Balbi wrote: > > Hi, > > Minas Harutyunyan <minas.harutyun...@synopsys.com> writes: >>>>>>> Thanks for picking this for -next. >>>>>>> Is it better to have this in v4.16-rc fixes? >>>>>

Re: [PATCH v1 2/3] usb: dwc2: Change ISOC DDMA flow

2018-03-19 Thread Minas Harutyunyan
Hi Zengtao, You email not received by linux-usb@vger.kernel.org. I suspect it rejected due to your email format have some issues, violate linux-usb@vger.kernel.org rules. I think you received email from linux-usb similar to this: : host

[PATCH v1 1/3] usb: dwc2: Enable BNA interrupt for IN endpoints

2018-03-17 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 v1 3/3] usb: dwc2: Add High Bandwidth ISOC OUT support

2018-03-17 Thread Minas Harutyunyan
transfers. In function dwc2_hsotg_ep_enable() desc chain allocation/ deallocation increased by mult times. Added bInterval limit checking for HB ISOC OUT because on completion frame number from desc used to check frame elapsed or no. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.

[PATCH v1 2/3] usb: dwc2: Change ISOC DDMA flow

2018-03-17 Thread Minas Harutyunyan
. In dwc2_hsotg_ep_enable() function added sanity check of bInterval for ISOC IN in DDMA mode, because HW not supported EP's with bInterval more than 12. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/core.h | 2 - drivers/usb/dwc2/gadget.c

[PATCH v1 0/3] usb: dwc2: gadget: Update ISOC DDMA flow.

2018-03-17 Thread Minas Harutyunyan
as described above. 3/3 patch add High bandwidth ISOC OUT transfers support. All patches were tested on HAPS-DX7 platform using internal USB test tool. Changes from version 0: Fix kbuild test robot warnings on idents. Minas Harutyunyan (3): usb: dwc2: Enable BNA interrupt for IN endpoints usb

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-17 Thread Minas Harutyunyan
Hi, On 3/16/2018 4:25 PM, Felipe Balbi wrote: > > Hi, > > Minas Harutyunyan <minas.harutyun...@synopsys.com> writes: >>>>> On 09/03/18 14:47, Roger Quadros wrote: >>>>>> In the following test we get stuck by sleeping forever in >>>

Re: [PATCH v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

2018-03-16 Thread Minas Harutyunyan
Hi, On 3/16/2018 3:03 PM, Roger Quadros wrote: > On 16/03/18 13:00, Felipe Balbi wrote: >> >> Hi, >> >> Roger Quadros writes: >> >>> Hi Felipe, >>> >>> On 09/03/18 14:47, Roger Quadros wrote: In the following test we get stuck by sleeping forever in _dwc3_set_mode()

[PATCH 2/3] usb: dwc2: Change ISOC DDMA flow

2018-03-16 Thread Minas Harutyunyan
. In dwc2_hsotg_ep_enable() function added sanity check of bInterval for ISOC IN in DDMA mode, because HW not supported EP's with bInterval more than 12. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.com> --- drivers/usb/dwc2/core.h | 2 - drivers/usb/dwc2/gadget.c

[PATCH 3/3] usb: dwc2: Add High Bandwidth ISOC OUT support

2018-03-16 Thread Minas Harutyunyan
transfers. In function dwc2_hsotg_ep_enable() desc chain allocation/ deallocation increased by mult times. Added bInterval limit checking for HB ISOC OUT because on completion frame number from desc used to check frame elapsed or no. Signed-off-by: Minas Harutyunyan <hmi...@synopsys.

[PATCH 0/3] usb: dwc2: gadget: Update ISOC DDMA flow.

2018-03-16 Thread Minas Harutyunyan
as described above. 3/3 patch add High bandwidth ISOC OUT transfers support. All patches were tested on HAPS-DX7 platform using internal USB test tool. Minas Harutyunyan (3): usb: dwc2: Enable BNA interrupt for IN endpoints usb: dwc2: Change ISOC DDMA flow usb: dwc2: Add High Bandwidth ISOC OUT

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

2018-03-16 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

Re: [PATCH] usb: dwc2: Fix interval type issue

2018-03-14 Thread Minas Harutyunyan
On 3/14/2018 2:12 PM, Minas Harutyunyan wrote: > On 2/6/2018 7:07 PM, Grigor Tovmasyan wrote: >> The maximum value that unsigned char can hold is 255, meanwhile >> the maximum value of interval is 2^(bIntervalMax-1)=2^15. >> >> Signed-off-by: Grigor Tovma

Re: [PATCH] usb: dwc2: Fix interval type issue

2018-03-14 Thread Minas Harutyunyan
g_ep { > unsigned char dir_in; > unsigned char index; > unsigned char mc; > - unsigned char interval; > + u16 interval; > > unsigned inthalted:1; > unsigned int

Re: Leak of queue heads in DWC2 driver?

2018-03-13 Thread Minas Harutyunyan
Hi Paul, On 3/13/2018 6:26 AM, Paul Zimmerman wrote: > Hi Minas, > > While ‌looking at the QH queuing in the DWC2 driver, I think I've found > some places where the QH struct may not be freed. Normally, the sequence is: > > dwc2_hcd_qh_unlink(); > < other stuff > >

Re: High CPU load produced by USB (DW2)

2018-03-13 Thread Minas Harutyunyan
Hi Paul, On 3/13/2018 2:39 AM, Paul Zimmerman wrote: > On Mon, 12 Mar 2018 12:06:55 +0000, Minas Harutyunyan > <minas.harutyun...@synopsys.com> wrote: > >> Hi Paul, >> >> Nice to hear you again! Hope you are doing well. > > Thanks, same to you. > &g

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

Re: High CPU load produced by USB (DW2)

2018-03-06 Thread Minas Harutyunyan
Hi, On 3/6/2018 10:45 AM, Minas Harutyunyan wrote: > Hi, > > On 3/5/2018 11:14 PM, Marek Vasut wrote: >> On 02/20/2018 06:51 AM, Minas Harutyunyan wrote: >> [...] >>>>>> Is there a way to reduce that or is that the absolute minimum in HS mode? >>&

Re: High CPU load produced by USB (DW2)

2018-03-05 Thread Minas Harutyunyan
Hi, On 3/5/2018 11:14 PM, Marek Vasut wrote: > On 02/20/2018 06:51 AM, Minas Harutyunyan wrote: > [...] >>>>> Is there a way to reduce that or is that the absolute minimum in HS mode? >>>>> >>>> We already discussed, in this email thread earlie

Re: Possible usb_request leak in the function dwc2_gadget_complete_isoc_request_ddma

2018-02-28 Thread Minas Harutyunyan
Hi, On 2/28/2018 1:00 PM, Zengtao (B) wrote: > Hi johnyoun: > > I found a suspected bug, and I am writing to confirm with you. > > In the function > dwc2_gadget_complete_isoc_request_ddma(drivers/usb/dwc2/gadget.c). > Only the first request from the eq queue is processed while maybe there are

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

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

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

[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

  1   2   >