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

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

2021-04-19 Thread Minas Harutyunyan
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 --- > drivers/usb/dwc2/core_in

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
Petrosyan > 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 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 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 09/15] usb: dwc2: Move exit hibernation to dwc2_port_resume() function

2021-04-19 Thread Minas Harutyunyan
ion but 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 08/15] usb: dwc2: Move enter hibernation to dwc2_port_suspend() function

2021-04-19 Thread Minas Harutyunyan
ion but 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 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 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 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 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 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 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 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 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 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 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] 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] 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: 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

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

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

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

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

2020-10-26 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 v6 0/3] Add USB role switch support to DWC2

2020-09-24 Thread Minas Harutyunyan
e |   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: [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

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 de

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

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

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: [PATCH v2 1/8] usb: dwc2: gadget: Make use of GINTMSK2

2020-07-15 Thread Minas Harutyunyan
ers/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: 1

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

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

2020-07-04 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 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 11/30] usb: dwc2: gadget: Avoid pointless read of EP control register

2020-07-03 Thread Minas Harutyunyan
t 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(-) >> &g

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

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

2020-06-25 Thread Minas Harutyunyan
/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: [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

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

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: use a longer AHB idle timeout in dwc2_core_reset()

2019-06-23 Thread Minas Harutyunyan
d 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 del

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

2019-06-06 Thread Minas Harutyunyan
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 | 20 +

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 deletions

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: REGRESSION: dwc2: gadget: Add scatter-gather mode

2019-03-11 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

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: 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] 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 1/1] usb: dwc2: disable power_down on Amlogic devices

2018-12-09 Thread Minas Harutyunyan
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 changed, 1

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] 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 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
> 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:43 PM, Da

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

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

2018-09-13 Thread Minas Harutyunyan
rnal 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 0/4] usb: dwc2: fix host mode external vbus supply management

2018-09-13 Thread Minas Harutyunyan
rnal 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-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-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: [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] 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 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-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 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: 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 writes: >>>

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
->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(>lock, flags); >> >> -dwc2_vbus_supply_init(hsotg); >> - >> -return 0; >> +return dwc2_vbus_supply_init(hsotg); >>} >> >>/* >> > > Reviewed-by: Grigor Tovmasyan > Acked-by: Minas Harutyunyan

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

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

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

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

[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

[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 --- 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 index 614bb9603def

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

[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] 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 --- drivers/usb/dwc2/hcd.c | 19 +++ 1 file changed, 19 insertions(+) diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c index 614bb9603def

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

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

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

[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 Signed-off-by: Minas Harutyunyan --- drivers/usb/dwc2/core.h | 4 drivers/usb/dwc2/gadget.c | 42 ++ drivers/usb/dwc2/params.c |

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

  1   2   >