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 > wrote: >> >> 1. Vardan's patch fixing issue when dwc2 switched from host to device >> mode. It's allow to make functional device after reconnecting without >>

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 > wrote: >> On b-plug disconnect should asserted GOTGINT.SesEndDet interrupt. >> According previously sent by you register dump (GHWCFG2 = 0x23affc70) >> your core OTG_MODE=0.

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

2017-10-24 Thread Minas Harutyunyan
/* Initialize the Core for Host mode */ > dwc2_core_init(hsotg, false); > dwc2_enable_global_interrupts(hsotg); > This patch is required for the HiKey platform, because the assertion of the "Connector ID status change" interrupt is different: asserting on B connector unplug and goes to Host mode. No any side effect on SNPS HAPS-DX platform where ConnIDStsChng assertion is correct. Acked-by: Minas Harutyunyan Tested-by: Minas Harutyunyan Thanks, Minas

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 > wrote: >> Could you please verify on your setup follow patches: >> 1. Vardan's patch. >> 2. Patch for TOUTCAL&USBTRDTIM programming (new version see below). &g

[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 --- drivers/usb/dwc2/hcd.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c

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 indicate the tot

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

2017-10-17 Thread Minas Harutyunyan
gt; --- 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); >> } >> } >> + >> +if (of_find_property(hsotg->dev->of_node, "disable-over-current", NULL)) >> +p->oc_disable = true; >> } >> >> static void dwc2_check_param_otg_cap(struct dwc2_hsotg *hsotg) >> > > Hi John Youn, I checked with HW team - patch is OK. Acked-by: Minas Harutyunyan

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

2017-10-18 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 >> wrote: >>> On b-plug disconnect should asserted GOTGINT.SesEndDet interrupt. >>> According previously s

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

2018-04-09 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 writes: >>>

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

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

2018-04-10 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] usb: dwc2: Revert "usb: dwc2: Disable all EP's on disconnect"

2018-12-07 Thread Minas Harutyunyan
t; Maynard > Thank you for testing. Issue which described looks like not related to these patches. For that issue please open another mail thread with more details. We will work on it. Thanks, Minas > On Tuesday, December 04, 2018 7:34 AM, Minas Harutyunyan wrote: >> On 11/23/2018 6

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

2018-12-07 Thread Minas Harutyunyan
Hi Marek, On 12/6/2018 7:04 PM, Marek Szyprowski wrote: > Dear Minas, > > On 2018-12-04 13:34, Minas Harutyunyan wrote: >> On 11/23/2018 6:43 PM, Dan Carpenter wrote: >>> Ugh... We also had a long thread about the v2 patch but it turns out >>> the list was not

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

2018-12-07 Thread Minas Harutyunyan
Hi Filipe, My patch dccf1bad4be7eaa096c1f3697bd37883f9a08ecb "usb: dwc2: Disable all EP's on disconnect" applied to 4.20-rc1. I need to update this patch. What I should do. There are 2 options: 1. Ack Marek Szyprowski [PATCH] usb: dwc2: Revert "usb: dwc2: Disable all EP's on disconnect" then

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

2018-12-07 Thread Minas Harutyunyan
Hi Dan, On 12/7/2018 2:16 PM, Dan Carpenter wrote: > On Wed, Dec 05, 2018 at 12:52:22PM +0000, Minas Harutyunyan wrote: >> Hi, >> >> On 12/4/2018 5:29 PM, Dan Carpenter wrote: >>> On Tue, Dec 04, 2018 at 12:34:08PM +, Minas Harutyunyan wrote: >

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

2018-12-07 Thread Minas Harutyunyan
Hi Dan, On 12/7/2018 3:20 PM, Minas Harutyunyan wrote: > Hi Dan, > > On 12/7/2018 2:16 PM, Dan Carpenter wrote: >> On Wed, Dec 05, 2018 at 12:52:22PM +, Minas Harutyunyan wrote: >>> Hi, >>> >>> On 12/4/2018 5:29 PM, Dan Carpenter wrote: >>&g

Re: [PATCH 1/1] usb: dwc2: disable power_down on Amlogic devices

2018-12-09 Thread Minas Harutyunyan
-for-v4.17' of > git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-testing"). > > Cc: # 4.19 > Suggested-by: Christian Hewitt > Signed-off-by: Martin Blumenstingl Acked-by: Minas Harutyunyan > --- > drivers/usb/dwc2/params.c | 1 + > 1 file

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-12-19 Thread Minas Harutyunyan
Hi John, On 12/18/2018 6:35 PM, John Keeping wrote: > Hi Minas, > > On Fri, 14 Dec 2018 09:00:08 +0000 > Minas Harutyunyan wrote: >> First of all, sorry for delayed answer. >> Looks like similar issue seen by Andrzej Pietrasiewicz >> : "dwc2 isochronous

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-12-14 Thread Minas Harutyunyan
Hi John, On 11/13/2018 2:46 AM, John Keeping wrote: > Hi Minas, > > On Mon, 12 Nov 2018 08:53:36 +0000 > Minas Harutyunyan wrote: >> On 11/9/2018 10:43 PM, John Keeping wrote: >>> On Fri, 9 Nov 2018 14:36:36 + >>> Minas Harutyunyan wrote: >&

Re: [PATCH] usb: dwc2: gadget: fix ISOC frame overflow handling

2018-12-23 Thread Minas Harutyunyan
Hi John, On 12/21/2018 8:05 PM, John Keeping wrote: > Hi Minas, > > On Wed, 19 Dec 2018 14:09:01 +0000 > Minas Harutyunyan wrote: > >> On 12/18/2018 6:35 PM, John Keeping wrote: >>> Hi Minas, >>> >>> On Fri, 14 Dec 2018 09:00:08 + >>&g

Re: [PATCH v3 05/14] usb: dwc2: Update port suspend/resume function definitions.

2021-04-08 Thread Minas Harutyunyan
ort_resume" functions to >"core.h" header file. > > - Updated function description in documentation. > > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v3: > - None > Changes in v2: > - None > > drivers/usb

Re: [PATCH v3 06/14] usb: dwc2: Add enter partial power down when port is suspended

2021-04-08 Thread Minas Harutyunyan
this patch > only Partial Power Down is implemented the Hibernation and > clock gating implementations are planned to be added. > > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v3: > - None > Changes in v2: > - None > >

Re: [PATCH v3 08/14] usb: dwc2: Add exit partial power down when port reset is asserted

2021-04-08 Thread Minas Harutyunyan
On 4/8/2021 1:45 PM, Artur Petrosyan wrote: > Adds Partial Power Down exiting flow when set port feature > reset is received in suspended state. > > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v3: > - None > Changes in v2: >

Re: [PATCH v3 07/14] usb: dwc2: Add exit partial power down when port is resumed

2021-04-08 Thread Minas Harutyunyan
atch > only Partial Power Down is implemented the Hibernation and > clock gating implementations are planned to be added. > > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v3: > - None > Changes in v2: > - None > > dr

Re: [PATCH v3 10/14] usb: dwc2: Allow exit partial power down in urb enqueue

2021-04-08 Thread Minas Harutyunyan
rocess upper layer request correctly. > > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v3: > - None > Changes in v2: > - None > > drivers/usb/dwc2/hcd.c | 7 +++ > 1 file changed, 7 insertions(+) > > diff -

Re: [PATCH v3 12/14] usb: dwc2: Update partial power down entering by system suspend

2021-04-08 Thread Minas Harutyunyan
Switch case statement is used for hibernation partial > power down and clock gating mode determination. In this patch > only Partial Power Down is implemented the Hibernation and > clock gating implementations are planned to be added. > > Signed-off-by: Artur Petrosyan Acked-by: Minas

Re: [PATCH v3 13/14] usb: dwc2: Fix partial power down exiting by system resume

2021-04-08 Thread Minas Harutyunyan
he Hibernation and > clock gating implementations are planned to be added. > > Cc: > Fixes: 6f6d70597c15 ("usb: dwc2: bus suspend/resume for hosts with > DWC2_POWER_DOWN_PARAM_NONE") > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Ch

Re: [PATCH v3 14/14] usb: dwc2: Add exit partial power down before removing driver

2021-04-08 Thread Minas Harutyunyan
e. > > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v3: > - None > Changes in v2: > - None > > drivers/usb/dwc2/platform.c | 11 ++- > 1 file changed, 10 insertions(+), 1 deletion(-) > > diff --git a/dri

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 > wrote: >> Hi John, >> >> On 5/19/2018 4:49 AM, John Stultz wrote: >>> In 4.17-rc, commit 03ea6d6e9e

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: [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 v4] usb: dwc2: dwc2_vbus_supply_init: fix error check

2018-04-05 Thread Minas Harutyunyan
hsotg->vbus_supply = NULL; >> +return ret == -ENODEV ? 0 : ret; >> +} >> >> return regulator_enable(hsotg->vbus_supply); >> } >> @@ -4342,9 +4347,7 @@ static int _dwc2_hcd_start(struct usb_hcd *hcd) >> >> spin_unlock_irqrestore(&hsotg->lock, flags); >> >> -dwc2_vbus_supply_init(hsotg); >> - >> -return 0; >> +return dwc2_vbus_supply_init(hsotg); >>} >> >>/* >> > > Reviewed-by: Grigor Tovmasyan > Acked-by: Minas Harutyunyan

Re: RPi4 DWC2 gadget doesn't copy data to a buffer in ep0 SETUP + DATA OUT transaction

2021-02-11 Thread Minas Harutyunyan
Hi Ruslan, On 2/1/2021 3:44 AM, Ruslan Bilovol wrote: > Hi Minas and other USB experts, > > I'm currently developing new features for UAC1/UAC2 audio gadgets > like Volume/Mute controls which use Control SETUP + DATA OUT > transactions through ep0. > > While it works fine on BeagleBone black boa

Re: [PATCH] usb: dwc2: Remove redundant null check before clk_prepare_enable/clk_disable_unprepare

2020-12-07 Thread Minas Harutyunyan
off-by: Xu Wang > > Reviewed-by: Artur Petrosyan > Acked-by: Minas Harutyunyan

Re: [PATCH] usb: dwc2: Using tab instead of blank

2021-03-19 Thread Minas Harutyunyan
On 3/19/2021 1:00 PM, Zeng Tao wrote: > Signed-off-by: Zeng Tao Acked-by: Minas Harutyunyan > --- > drivers/usb/dwc2/gadget.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c > index ad

Re: [PATCH v2 01/15] usb: dwc2: Update exit hibernation when port reset is asserted

2021-04-19 Thread Minas Harutyunyan
RNATION" param. > > - For code readability Hibernation exit code moved after > debug message print. > > - Added "dwc2_exit_hibernation()" function error checking. > > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v2: &

Re: [PATCH v2 03/15] usb: dwc2: Fix host mode hibernation exit with remote wakeup flow.

2021-04-19 Thread Minas Harutyunyan
ice hibernation functions") > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v2: > - None > > drivers/usb/dwc2/hcd.c | 10 +- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/dwc2/

Re: [PATCH v2 08/15] usb: dwc2: Move enter hibernation to dwc2_port_suspend() function

2021-04-19 Thread Minas Harutyunyan
ut other power saving modes > in "dwc2_port_suspend()" function. > > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v2: > - None > > drivers/usb/dwc2/hcd.c | 18 ++ > 1 file changed, 14 insertions(+),

Re: [PATCH v2 09/15] usb: dwc2: Move exit hibernation to dwc2_port_resume() function

2021-04-19 Thread Minas Harutyunyan
ut other power saving modes > in "dwc2_port_resume()" function. > > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v2: > - None > > drivers/usb/dwc2/hcd.c | 13 +++-- > 1 file changed, 7 insertions(+), 6 deletions

Re: [PATCH v2 10/15] usb: dwc2: Allow exit hibernation in urb enqueue

2021-04-19 Thread Minas Harutyunyan
pper layer request properly. > > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v2: > - Moved duplicated error checking *if* conditions from innermost to outside > if. > > drivers/usb/dwc2/hcd.c | 14 ++ > 1 file change

Re: [PATCH v2 11/15] usb: dwc2: Add hibernation entering flow by system suspend

2021-04-19 Thread Minas Harutyunyan
On 4/16/2021 4:48 PM, Artur Petrosyan wrote: > Adds a new flow of entering hibernation when PC is > hibernated or suspended. > > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v2: > - None > > drivers/usb/dwc2/hcd.c | 10 ++

Re: [PATCH v2 12/15] usb: dwc2: Add hibernation exiting flow by system resume

2021-04-19 Thread Minas Harutyunyan
On 4/16/2021 4:48 PM, Artur Petrosyan wrote: > Adds a new flow of exiting hibernation when PC is resumed > from suspend state. > > Signed-off-by: Artur Petrosyan Acked-by: Minas Harutyunyan > --- > Changes in v2: > - None > > drivers/usb/dwc2/hcd.c | 10 ++

Re: [PATCH v2 13/15] usb: dwc2: Add exit hibernation mode before removing drive

2021-04-19 Thread Minas Harutyunyan
rosyan > Reported-by: kernel test robot > Reported-by: Dan Carpenter Acked-by: Minas Harutyunyan > --- > drivers/usb/dwc2/platform.c | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/drivers/usb/dwc2/platform.c b/drivers/usb/dwc2/platform.c

Re: [PATCH v2 15/15] usb: dwc2: Get rid of useless error checks in suspend interrupt

2021-04-19 Thread Minas Harutyunyan
_err() calls since they already have the > device name as part of the message. > > Signed-off-by: Artur Petrosyan > Signed-off-by: Douglas Anderson Acked-by: Minas Harutyunyan > --- > Changes in v2: > - None > > drivers/usb/dwc2/core.c | 3 --- > driv

Re: RPi4 DWC2 gadget doesn't copy data to a buffer in ep0 SETUP + DATA OUT transaction

2021-04-19 Thread Minas Harutyunyan
Hi Pavel, On 4/19/2021 5:22 PM, Pavel Hofman wrote: > > Dne 11. 02. 21 v 12:21 Minas Harutyunyan napsal(a): >> Hi Ruslan, >> >> On 2/1/2021 3:44 AM, Ruslan Bilovol wrote: >>> Hi Minas and other USB experts, >>> >>> I'm currently developing

Re: [PATCH] usb: dwc2: Add STM32 related debugfs entries

2021-02-28 Thread Minas Harutyunyan
On 2/28/2021 1:55 AM, Martin Devera wrote: > These are entries related to STM32MP1 PHY control. > > Signed-off-by: Martin Devera Acked-by: Minas Harutyunyan > --- > drivers/usb/dwc2/debugfs.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/

Re: [PATCH 1/3] usb: dwc2: set ahbcfg parameter for STM32MP15 OTG HS and FS

2020-11-29 Thread Minas Harutyunyan
> > Signed-off-by: Amelie Delaunay Acked-by: Minas Harutyunyan > --- > drivers/usb/dwc2/params.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c > index 267543c3dc38..0df693319f0a 100644 > --- a/drive

Re: [PATCH 2/3] usb: dwc2: enable FS/LS PHY clock select on STM32MP15 FS OTG

2020-11-29 Thread Minas Harutyunyan
clock during Low-Speed mode. > > Signed-off-by: Amelie Delaunay Acked-by: Minas Harutyunyan > --- > drivers/usb/dwc2/params.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c > index 0df693319f0a..9e5

Re: [PATCH 3/3] usb: dwc2: disable Link Power Management on STM32MP15 HS OTG

2020-11-29 Thread Minas Harutyunyan
he device is still not enumerated. > > To avoid this issue, disable Link Power Management on STM32MP15 HS OTG. > > Signed-off-by: Amelie Delaunay Acked-by: Minas Harutyunyan > --- > drivers/usb/dwc2/params.c | 4 > 1 file changed, 4 insertions(+) > > diff --g

Re: [PATCH] usb: dwc2: hcd: call dwc2_is_controller_alive under spinlock

2019-02-14 Thread Minas Harutyunyan
Hi Jaehoon Chung, On 2/14/2019 2:04 PM, Jaehoon Chung wrote: > This patch is referred to Robert's patch > commit cf54772b913b ("usb: dwc2: call dwc2_is_controller_alive() under > spinlock") > > During running sdb with otg mode, the usb is hung sometime. > > The one of SDB hang issues should be

Re: [PATCH] usb: dwc2: use a longer AHB idle timeout in dwc2_core_reset()

2019-06-23 Thread Minas Harutyunyan
of using a timeout that "works for one board" (180us in my case) to have consistent behavior across the dwc2 driver. Cc: linux-stable # 4.19+ Signed-off-by: Martin Blumenstingl --- Acked-by: Minas Harutyunyan drivers/usb/dwc2/core.c | 2 +- 1 file changed, 1 insertion(+), 1 delet

Re: REGRESSION: dwc2: gadget: Add scatter-gather mode

2019-03-10 Thread Minas Harutyunyan
Hi Andrzej, USB CV MSC tests failed starting from Test Case 6 with BNA interrupt on ep1in. It's first BULK IN transaction after GET MAXLUN. [319523.955339] dwc2 dwc2.1.auto: dwc2_hsotg_irq: 04088028 0008 (d88c3cc4) retry 8 [319523.955357] dwc2 dwc2.1.auto: dwc2_hsotg_irq: daint=0002 [31

Re: [PATCH 0/4] usb: dwc2: fix host mode external vbus supply management

2018-09-12 Thread Minas Harutyunyan
external vbus-supply > > drivers/usb/dwc2/hcd.c | 45 > ++--- > drivers/usb/dwc2/platform.c | 8 > 2 files changed, 42 insertions(+), 11 deletions(-) > Tested-by: Artur Petrosyan Acked-by: Minas Harutyunyan

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 v2] usb: dwc3: Prevent indefinite sleep in _dwc3_set_mode during suspend/resume

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

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 writes: >>>>>>> Thanks for picking this for -next. >>>>>>> Is it better to have this in v4.16-rc fixes? >>>>>>> and also stable? v4.12+ &g

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 writes: >>>>>>>> Thanks for picking this for -next. >>>>>>>

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() after which dual-rol

Re: [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register

2020-07-03 Thread Minas Harutyunyan
‘ctrl’ set but not >> used [-Wunused-but-set-variable] >> 2981 | u32 ctrl; >> | ^~~~ >> >> Cc: Minas Harutyunyan >> Cc: Ben Dooks >> Signed-off-by: Lee Jones >> --- >> drivers/usb/dwc2/gadget.c | 2 -- >> 1 file changed, 2 deletions(-) &

Re: [PATCH 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register

2020-07-03 Thread Minas Harutyunyan
Hi, On 7/3/2020 11:43 AM, Greg KH wrote: > On Fri, Jul 03, 2020 at 07:38:16AM +0000, Minas Harutyunyan wrote: >> Hi, >> >> On 7/3/2020 11:29 AM, Greg KH wrote: >>> On Thu, Jul 02, 2020 at 03:46:06PM +0100, Lee Jones wrote: >>>> Commit ec1f9d9f01384 (&qu

Re: [PATCH for-5.8 v2] usb: dwc2: Add missing cleanups when usb_add_gadget_udc() fails

2020-07-03 Thread Minas Harutyunyan
e error path. > > Fixes: 207324a321a866 ("usb: dwc2: Postponed gadget registration to the udc > class driver") > Signed-off-by: Martin Blumenstingl Acked-by: Minas Harutyunyan > --- > Changes since v1 at [0] > - also cleanup the HCD as suggested by Minas (than

Re: [PATCH 0/3] Add USB role switch support to DWC2

2020-06-25 Thread Minas Harutyunyan
/dwc2/drd.c | 190 + > drivers/usb/dwc2/gadget.c | 2 +- > drivers/usb/dwc2/params.c | 4 +- > drivers/usb/dwc2/platform.c| 13 ++ > 8 files changed, 218 insertions(+), 4 deletions(-) > create mode 100644 drivers/usb/dwc2/drd.c > For dwc2: Acked-by Minas Harutyunyan Thanks, Minas

Re: [PATCH] usb: dwc2: Fix error path in gadget registration

2020-07-14 Thread Minas Harutyunyan
Hi Marek, On 7/14/2020 12:48 PM, Marek Szyprowski wrote: > When gadget registration fails, one should not call usb_del_gadget_udc(). > Ensure this by setting gadget->udc to NULL. Also in case of a failure I was able to reproduce issue. I'm Ok with this fix. > there is no need to disable low-level

Re: [PATCH] sr: dwc2/gadget: remove unneccessary if

2020-06-06 Thread Minas Harutyunyan
Hi Pavel, On 6/6/2020 7:37 PM, Pavel Machek wrote: > We don't really need if/else to set variable to 1/0. > > Signed-off-by: Pavel Machek (CIP) > > diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c > index 12b98b466287..f9f6fd470c81 100644 > --- a/drivers/usb/dwc2/gadget.c > ++

Re: [PATCH] usb: dwc2: Avoid leaving the error_debugfs label unused

2020-10-25 Thread Minas Harutyunyan
+ IS_ENABLED(CONFIG_USB_DWC2_DUAL_ROLE) > error_debugfs: > dwc2_debugfs_exit(hsotg); > if (hsotg->hcd_enabled) > dwc2_hcd_remove(hsotg); > +#endif > error_drd: > dwc2_drd_exit(hsotg); > > Acked-by: Minas Harutyunyan

Re: [PATCH] usb: dwc2: Fix unused label warning

2020-11-01 Thread Minas Harutyunyan
On 10/31/2020 10:03 AM, YueHaibing wrote: > drivers/usb/dwc2/platform.c: In function ‘dwc2_driver_probe’: > drivers/usb/dwc2/platform.c:611:1: warning: label ‘error_debugfs’ defined but > not used [-Wunused-label] > error_debugfs: > ^ > > Move label 'error_debugfs' to ifdef block.

Re: [PATCH for-5.8 v2] usb: dwc2: Add missing cleanups when usb_add_gadget_udc() fails

2020-07-26 Thread Minas Harutyunyan
Hi Martin, On 7/4/2020 2:50 AM, Martin Blumenstingl wrote: > Call dwc2_debugfs_exit() and dwc2_hcd_remove() (if the HCD was enabled > earlier) when usb_add_gadget_udc() has failed. This ensures that the > debugfs entries created by dwc2_debugfs_init() as well as the HCD are > cleaned up in the err

Re: [PATCH v2 1/8] usb: dwc2: gadget: Make use of GINTMSK2

2020-07-21 Thread Minas Harutyunyan
Hi Felipe, On 7/21/2020 1:43 PM, Felipe Balbi wrote: > Minas Harutyunyan writes: > >> On 7/15/2020 1:32 PM, Lee Jones wrote: >>> The value obtained from GINTSTS2 should be masked with the GINTMSK2 >>> value. Looks like this has been broken since >>> dwc

Re: [PATCH v2 1/8] usb: dwc2: gadget: Make use of GINTMSK2

2020-07-15 Thread Minas Harutyunyan
usb/dwc2/gadget.c: In function ‘dwc2_gadget_wkup_alert_handler’: > drivers/usb/dwc2/gadget.c:259:6: warning: variable ‘gintmsk2’ set but not > used [-Wunused-but-set-variable] > 259 | u32 gintmsk2; > | ^~~~ > > Cc: Minas Harutyunyan > Cc: Ben Dooks > Fixes: 187c5

Re: [PATCH] usb: dwc2: Fix error path in gadget registration

2020-07-15 Thread Minas Harutyunyan
Hi Marek, On 7/15/2020 12:42 PM, Marek Szyprowski wrote: > Hi Minas, > > On 14.07.2020 14:32, Minas Harutyunyan wrote: >> On 7/14/2020 12:48 PM, Marek Szyprowski wrote: >>> When gadget registration fails, one should not call usb_del_gadget_udc(). >>> Ensure th

Re: [RFC for-5.8] usb: dwc2: Cleanup debugfs when usb_add_gadget_udc() fails

2020-07-23 Thread Minas Harutyunyan
Hi Felipe, On 7/23/2020 5:03 PM, Felipe Balbi wrote: > Minas Harutyunyan writes: > >> Hi Martin, >> >> On 6/29/2020 10:03 PM, Martin Blumenstingl wrote: >>> Call dwc2_debugfs_exit() when usb_add_gadget_udc() has failed. This >>> ensure that the debugfs

Re: [PATCH v2] usb: dwc2: Fix error path in gadget registration

2020-07-16 Thread Minas Harutyunyan
Hi Marek, On 7/16/2020 4:09 PM, Marek Szyprowski wrote: > When gadget registration fails, one should not call usb_del_gadget_udc(). > Ensure this by setting gadget->udc to NULL. Also in case of a failure > there is no need to disable low-level hardware, so return immiedetly > instead of jumping to

Re: [PATCH v2] usb: dwc2: Fix error path in gadget registration

2020-07-16 Thread Minas Harutyunyan
Hi, On 7/16/2020 4:33 PM, Marek Szyprowski wrote: > Hi Minas, > > On 16.07.2020 14:19, Minas Harutyunyan wrote: >> On 7/16/2020 4:09 PM, Marek Szyprowski wrote: >>> When gadget registration fails, one should not call usb_del_gadget_udc(). >>> Ensure this by set

Re: [PATCH v6 0/3] Add USB role switch support to DWC2

2020-09-24 Thread Minas Harutyunyan
c2/Makefile |   2 +- >>   drivers/usb/dwc2/core.h   |   9 + >>   drivers/usb/dwc2/drd.c    | 180 ++ >>   drivers/usb/dwc2/gadget.c |   2 +- >>   drivers/usb/dwc2/params.c |   2 +- >>   drivers/usb/dwc2/platform.c   |  20 +- >>   8 files changed, 215 insertions(+), 5 deletions(-) >>   create mode 100644 drivers/usb/dwc2/drd.c >> Acked-by: Minas Harutyunyan for dwc2

Re: [RFC for-5.8] usb: dwc2: Cleanup debugfs when usb_add_gadget_udc() fails

2020-07-01 Thread Minas Harutyunyan
Hi Martin, On 6/29/2020 10:03 PM, Martin Blumenstingl wrote: > Call dwc2_debugfs_exit() when usb_add_gadget_udc() has failed. This > ensure that the debugfs entries created by dwc2_debugfs_init() are > cleaned up in the error path. > > Fixes: 207324a321a866 ("usb: dwc2: Postponed gadget registrat

Re: [PATCH] usb: dwc2: host: Fix wMaxPacketSize handling (fix webcam regression)

2019-06-06 Thread Minas Harutyunyan
h the new API. Fixes: abb621844f6a ("usb: ch9: make usb_endpoint_maxp() return only packet size") Cc: sta...@vger.kernel.org Signed-off-by: Douglas Anderson --- Acked-by: Minas Harutyunyan drivers/usb/dwc2/hcd.c | 29 + drivers/usb/dwc2/hcd.h

Re: [PATCH] usb: dwc2: Fix DMA cache alignment issues

2019-05-30 Thread Minas Harutyunyan
ly. Thanks! Tested-by: Douglas Anderson Reviewed-by: Douglas Anderson Cc: Acked-by: Minas Harutyunyan

Re: [PATCH] Revert "usb: dwc2: host: Setting qtd to NULL after freeing it"

2019-05-30 Thread Minas Harutyunyan
functions. This is just confusing, so let's remove it. Cc: Vardan Mikayelyan Cc: John Youn Cc: Douglas Anderson Cc: Felipe Balbi Signed-off-by: Guenter Roeck Acked-by: Minas Harutyunyan --- drivers/usb/dwc2/hcd.c | 1 - drivers/usb/dwc2/hcd.h | 1 - 2 files changed, 2 dele

Re: [PATCH] usb: dwc2: use well defined macros for power_down

2020-06-16 Thread Minas Harutyunyan
Hi, On 6/16/2020 12:26 PM, Jisheng Zhang wrote: > Use the well defined macros such as DWC2_POWER_DOWN_PARAM_NONE, > DWC2_POWER_DOWN_PARAM_PARTIAL and DWC2_POWER_DOWN_PARAM_HIBERNATION > to make code more readable. > > Signed-off-by: Jisheng Zhang Acked-by: Minas Harutyunyan &g

Re: [Query]usb: dwc2: suspend/resume support for DWC2_POWER_DOWN_PARAM_NONE case

2020-06-16 Thread Minas Harutyunyan
Hi Jisheng, On 6/16/2020 1:03 PM, Jisheng Zhang wrote: > Hi, > > After reading current dwc2 code, I got an impression that resume from suspend > to ram isn't supported for DWC2_POWER_DOWN_PARAM_NONE case, right? In fact 'ram' Do you mean on suspend save registers in RAM? If yes, then in case when

Re: [PATCH] sr: dwc2/gadget: remove unneccessary if

2020-06-09 Thread Minas Harutyunyan
Hi, On 6/6/2020 11:05 PM, Pavel Machek wrote: > Hi! > >>> We don't really need if/else to set variable to 1/0. >>> >>> Signed-off-by: Pavel Machek (CIP) >>> >>> diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c >>> index 12b98b466287..f9f6fd470c81 100644 >>> --- a/drivers/usb/dw

[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 --- drivers/usb/dwc2/gadget.c | 20 ++-- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/drivers/usb/dwc2/gadget.c b

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: >>> >>> dwc2 f72c.usb: dwc2_hc_c

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 > 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, 2017 at 12:00 PM, John Stultz >>>>

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 > wrote: >> >> Hi, >> >> Minas Harutyunyan writes: >>>>>>>> We've noticed that when using usb ethernet adapters on HiKey, we >>>>

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 > mailto:minas.harutyun...@synopsys.com>> > wrote: >> On 4/4/2017 11:03 PM, John Stultz wrote: >>> >>> I did notice when cating the regdump file, I saw: &

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: > mailto:minas.harutyun...@synopsys.com>> > wrote: >> On 4/4/2017 11:03 PM, John Stultz wrote: >>> >>> I did notice when cating the regdump file, I saw: >>> dwc2 f72c.usb: Mode Mismatch Inter

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 writes: >> After data out stage gadget driver should not initate ZLP on control EP, >> because it is up to function driver. > > not true always, depends on return value from ->setup(). Wh

[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 --- drivers/usb/dwc2/gadget.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletion

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

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

2017-07-10 Thread Minas Harutyunyan
USB CV driver stack doesn't perform USB RESET after device disconnect/ connect, so need to reset to zero DEVADDR field in DCFG to pass enumeration again. Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/gadget.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/usb

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 writes: >> USB CV driver stack doesn't perform USB RESET after device disconnect/ >> connect, so need to reset to zero DEVADDR field in DCFG to pass >> enumeration again. >

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 writes: >> Hi, >> >> Minas Harutyunyan writes: >>> USB CV driver stack doesn't perform USB RESET after device disconnect/ >>> connect, so need to reset

[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 --- drivers/usb/dwc2/gadget.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a

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 writes: >>> Minas Harutyunyan writes: >>>> USB CV driver stack doesn't perform USB RESET after device disconnect/ >>>> connect, so need to reset to zero DE

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

2017-10-03 Thread Minas Harutyunyan
ys been broken so its not really a regression. But still. >> >> I'd love to get some feedback on the patches and consideration >> to be merged upstream. >> >> thanks >> -john >> >> Cc: Wei Xu >> Cc: Guodong Xu >> Cc: Amit Pundir

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
ZSs&s=MdrOhV0i6kRrV2mHK5zHIwE1eF21MsTkHIjvsV2k7uw&e= > ), we avoid the mismatched interrupts and 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

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

2017-10-03 Thread Minas Harutyunyan
r the state of the OTG port. > > This patch adds a call so that we report to the UDC layer when > the gadget device is disconnected. > > Cc: Wei Xu > Cc: Guodong Xu > Cc: Amit Pundir > Cc: YongQin Liu > Cc: John Youn > Cc: Minas Harutyunyan > Cc: Douglas Anderson

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 > wrote: >> >> Could you please apply patch from Vardan Mikayelyan "usb: dwc2: Fix >> dwc2_hsotg_core_init_disconnected()" submitted at 02/25/2017 >> (https://

  1   2   >