linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [Bug 209555] New: dwc2 driver stops working after sudden disconnect
@ 2020-10-06 21:59 bugzilla-daemon
  2020-10-07 20:00 ` [Bug 209555] " bugzilla-daemon
                   ` (25 more replies)
  0 siblings, 26 replies; 30+ messages in thread
From: bugzilla-daemon @ 2020-10-06 21:59 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

            Bug ID: 209555
           Summary: dwc2 driver stops working after sudden disconnect
           Product: Drivers
           Version: 2.5
    Kernel Version: 5.9.0-rc6
          Hardware: ARM
                OS: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: USB
          Assignee: drivers_usb@kernel-bugs.kernel.org
          Reporter: tomasz@grobelny.net
        Regression: No

Created attachment 292875
  --> https://bugzilla.kernel.org/attachment.cgi?id=292875&action=edit
dmesg

Setup:
# uname -a
Linux odroid 5.9.0-rc6-dirty #1 SMP PREEMPT Tue Oct 6 20:04:44 UTC 2020 aarch64
aarch64 aarch64 GNU/Linux

dwc2 driver working in gadget mode on Odroid N2 using function fs
kernel: branch next from
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git

Scenario:
Odroid connects as custom gadget (with mass storage function, see second 114
and 134), then is switched to Android Open Accessory mode and start
transmission using function fs (uses ep0,ep1,ep2 channels). Suddenly the USB
cable is pulled out (roughly second 122).

Running the same sequence of actions (second 134) does not work any more until
reboot. In dmesg one can see timeouts. Also, before enabling debug output I
could see "HANG! Soft Reset timeout GRSTCTL_CSFTRST_DONE" line in dmesg output
(drivers/usb/dwc2/core.c:538)

Therefore my conclusion is that there is something wrong with handling device
disconnect.

Due to number of produced debug messages dmesg output might be incomplete.
Please let me know if I can somehow help to fix this bug.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
@ 2020-10-07 20:00 ` bugzilla-daemon
  2020-10-08  7:46 ` bugzilla-daemon
                   ` (24 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2020-10-07 20:00 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #1 from Tomasz Grobelny (tomasz@grobelny.net) ---
Here is annotated dmesg without debugging info:

[   31.709214] USB_PWR_EN: disabling
//here I connect the cable and run my program
[   54.771552] Mass Storage Function, version: 2009/09/11
[   54.771561] LUN: removable file: (no medium)
[   54.781721] file system registered
[   54.782484] read descriptors
[   54.782495] read strings
[   54.786939] dwc2 ff400000.usb: bound driver configfs-gadget
[   54.976434] dwc2 ff400000.usb: new device is high-speed
[   55.090994] dwc2 ff400000.usb: new device is high-speed
[   55.142436] dwc2 ff400000.usb: new address 4
[   56.219325] ffs_data_put(): freeing
[   56.219828] unloading
//here the switch to AOA mode happens: it is as if the device was disconected
and entirely new device (different vid, pid) connected
[   56.257710] file system registered
[   56.258362] read descriptors
[   56.258373] read strings
[   56.262135] dwc2 ff400000.usb: bound driver configfs-gadget
[   56.454364] dwc2 ff400000.usb: new device is high-speed
[   56.568367] dwc2 ff400000.usb: new device is high-speed
[   56.620390] dwc2 ff400000.usb: new address 5
// here the cable is disconnected
[   79.288505] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
DIEPINT.NAKEFF
[   79.288625] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
DOEPCTL.EPDisable
[   79.299850] dwc2 ff400000.usb: dwc2_flush_tx_fifo:  HANG! AHB Idle GRSCTL
[   79.299982] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
GINTSTS.GOUTNAKEFF
[   79.300105] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
DOEPCTL.EPDisable
[   79.307060] ffs_data_put(): freeing
[   79.307355] unloading
// rmmod dwc2 && modprobe dwc2
[  119.388282] dwc2 ff400000.usb: supply vusb_d not found, using dummy
regulator
[  119.388349] dwc2 ff400000.usb: supply vusb_a not found, using dummy
regulator
[  119.388500] dwc2 ff400000.usb: Bad value for GSNPSID: 0x00000000
// run my program again, as you see it doesn't reach the "bound driver
configfs-gadget" line seen above
[  255.814129] Mass Storage Function, version: 2009/09/11
[  255.814138] LUN: removable file: (no medium)
[  255.814545] file system registered
[  255.815119] read descriptors
[  255.815128] read strings

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
  2020-10-07 20:00 ` [Bug 209555] " bugzilla-daemon
@ 2020-10-08  7:46 ` bugzilla-daemon
  2020-10-08 19:47 ` bugzilla-daemon
                   ` (23 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2020-10-08  7:46 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

Minas Harutyunyan (Minas.Harutyunyan@synopsys.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Minas.Harutyunyan@synopsys.
                   |                            |com

--- Comment #2 from Minas Harutyunyan (Minas.Harutyunyan@synopsys.com) ---
Hi Tomasz,

Could you please disable power optimization by follow workaround and test
again:

file: params.c

static void dwc2_set_param_power_down(struct dwc2_hsotg *hsotg)
{
        int val;

        if (hsotg->hw_params.hibernation)
                val = DWC2_POWER_DOWN_PARAM_HIBERNATION;
        else if (hsotg->hw_params.power_optimized)
                val = DWC2_POWER_DOWN_PARAM_PARTIAL;
        else
                val = DWC2_POWER_DOWN_PARAM_NONE;

        hsotg->params.power_down = 0; //val; WA
}

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
  2020-10-07 20:00 ` [Bug 209555] " bugzilla-daemon
  2020-10-08  7:46 ` bugzilla-daemon
@ 2020-10-08 19:47 ` bugzilla-daemon
  2020-10-09  6:47 ` bugzilla-daemon
                   ` (22 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2020-10-08 19:47 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #3 from Tomasz Grobelny (tomasz@grobelny.net) ---
With this change everything works correctly for me - I can run my program
multiple time without rebooting my Odroid between cable disconnects. Thanks a
lot. Please let me know if you need any help testing permanent fix for this
issue.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (2 preceding siblings ...)
  2020-10-08 19:47 ` bugzilla-daemon
@ 2020-10-09  6:47 ` bugzilla-daemon
  2021-02-26  1:43 ` bugzilla-daemon
                   ` (21 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2020-10-09  6:47 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #4 from Minas Harutyunyan (Minas.Harutyunyan@synopsys.com) ---
We aware about the issues in programming of power saving modes and very soon
will commit patch series to fix that.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (3 preceding siblings ...)
  2020-10-09  6:47 ` bugzilla-daemon
@ 2021-02-26  1:43 ` bugzilla-daemon
  2021-07-24 16:42 ` bugzilla-daemon
                   ` (20 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-02-26  1:43 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #5 from Tomasz Grobelny (tomasz@grobelny.net) ---
Any news about this one?

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (4 preceding siblings ...)
  2021-02-26  1:43 ` bugzilla-daemon
@ 2021-07-24 16:42 ` bugzilla-daemon
  2021-07-25  5:45   ` Minas Harutyunyan
  2021-07-25  5:45 ` bugzilla-daemon
                   ` (19 subsequent siblings)
  25 siblings, 1 reply; 30+ messages in thread
From: bugzilla-daemon @ 2021-07-24 16:42 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

Yunhao Tian (t123yh@outlook.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |t123yh@outlook.com

--- Comment #6 from Yunhao Tian (t123yh@outlook.com) ---
Hi,

I'm using RK3308 Rock Pi S, and experiencing a similar issue (though not the
same) on v5.14.0-rc2. The mentioned workaround doesn't work. The following
testing is done with the workaround applied.

When the host is unplugged, the message buffer is bloated with the following
message repeatedly:

# [   23.215674] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
[   23.216448] configfs-gadget gadget: 220 Error!
[   23.231677] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
[   23.232382] configfs-gadget gadget: 220 Error!
[   23.247524] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
[   23.263000] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
[   23.278459] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL

And if we plug the cable in again, the HANG message stops, followed by these
messages:

[   18.332489] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
GINTSTS.GOUTNAKEFF
[   18.333378] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
DOEPCTL.EPDisable
[   18.334265] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
GINTSTS.GOUTNAKEFF

And then the kernel completely freezes, not able to even respond to a key
stroke or network ping.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Bug 209555] dwc2 driver stops working after sudden disconnect
  2021-07-24 16:42 ` bugzilla-daemon
@ 2021-07-25  5:45   ` Minas Harutyunyan
  0 siblings, 0 replies; 30+ messages in thread
From: Minas Harutyunyan @ 2021-07-25  5:45 UTC (permalink / raw)
  To: bugzilla-daemon, linux-usb

Hi,

On 7/24/2021 8:42 PM, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://urldefense.com/v3/__https://bugzilla.kernel.org/show_bug.cgi?id=209555__;!!A4F2R9G_pg!L1C5v0Y0uLaHYGYBeR8HcEuRxTDT44Q7Bw2YABG-ORqKdbDL0sms340fBRmSSSH-Zo7r765Z$
> 
> Yunhao Tian (t123yh@outlook.com) changed:
> 
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |t123yh@outlook.com
> 
> --- Comment #6 from Yunhao Tian (t123yh@outlook.com) ---
> Hi,
> 
> I'm using RK3308 Rock Pi S, and experiencing a similar issue (though not the
> same) on v5.14.0-rc2. The mentioned workaround doesn't work. The following
> testing is done with the workaround applied.

For 5.14-rc2 doesn't need to apply mentioned workaround because the 
power issue related to 'rmmod dwc2' resolved.
> 
> When the host is unplugged, the message buffer is bloated with the following
> message repeatedly:
> 
> # [   23.215674] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
> [   23.216448] configfs-gadget gadget: 220 Error!
> [   23.231677] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
> [   23.232382] configfs-gadget gadget: 220 Error!
> [   23.247524] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
> [   23.263000] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
> [   23.278459] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
> 
> And if we plug the cable in again, the HANG message stops, followed by these
> messages:
> 
> [   18.332489] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
> GINTSTS.GOUTNAKEFF
> [   18.333378] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
> DOEPCTL.EPDisable
> [   18.334265] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
> GINTSTS.GOUTNAKEFF
> 
> And then the kernel completely freezes, not able to even respond to a key
> stroke or network ping.
> 
Could you please apply patch "[PATCH v2] usb: phy: Fix page fault from 
usb_phy_uevent" from Artur Petrosyan and test again.


Thanks,
Minas

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (5 preceding siblings ...)
  2021-07-24 16:42 ` bugzilla-daemon
@ 2021-07-25  5:45 ` bugzilla-daemon
  2021-07-25  6:55 ` bugzilla-daemon
                   ` (18 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-07-25  5:45 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #7 from Minas Harutyunyan (Minas.Harutyunyan@synopsys.com) ---
Hi,

On 7/24/2021 8:42 PM, bugzilla-daemon@bugzilla.kernel.org wrote:
>
> https://urldefense.com/v3/__https://bugzilla.kernel.org/show_bug.cgi?id=209555__;!!A4F2R9G_pg!L1C5v0Y0uLaHYGYBeR8HcEuRxTDT44Q7Bw2YABG-ORqKdbDL0sms340fBRmSSSH-Zo7r765Z$
> 
> Yunhao Tian (t123yh@outlook.com) changed:
> 
>             What    |Removed                     |Added
> ----------------------------------------------------------------------------
>                   CC|                            |t123yh@outlook.com
> 
> --- Comment #6 from Yunhao Tian (t123yh@outlook.com) ---
> Hi,
> 
> I'm using RK3308 Rock Pi S, and experiencing a similar issue (though not the
> same) on v5.14.0-rc2. The mentioned workaround doesn't work. The following
> testing is done with the workaround applied.

For 5.14-rc2 doesn't need to apply mentioned workaround because the 
power issue related to 'rmmod dwc2' resolved.
> 
> When the host is unplugged, the message buffer is bloated with the following
> message repeatedly:
> 
> # [   23.215674] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle
> GRSCTL
> [   23.216448] configfs-gadget gadget: 220 Error!
> [   23.231677] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
> [   23.232382] configfs-gadget gadget: 220 Error!
> [   23.247524] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
> [   23.263000] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
> [   23.278459] dwc2 ff400000.usb: dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
> 
> And if we plug the cable in again, the HANG message stops, followed by these
> messages:
> 
> [   18.332489] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
> GINTSTS.GOUTNAKEFF
> [   18.333378] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
> DOEPCTL.EPDisable
> [   18.334265] dwc2 ff400000.usb: dwc2_hsotg_ep_stop_xfr: timeout
> GINTSTS.GOUTNAKEFF
> 
> And then the kernel completely freezes, not able to even respond to a key
> stroke or network ping.
> 
Could you please apply patch "[PATCH v2] usb: phy: Fix page fault from 
usb_phy_uevent" from Artur Petrosyan and test again.


Thanks,
Minas

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (6 preceding siblings ...)
  2021-07-25  5:45 ` bugzilla-daemon
@ 2021-07-25  6:55 ` bugzilla-daemon
  2021-07-25  7:16   ` Minas Harutyunyan
  2021-07-25  7:17 ` bugzilla-daemon
                   ` (17 subsequent siblings)
  25 siblings, 1 reply; 30+ messages in thread
From: bugzilla-daemon @ 2021-07-25  6:55 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #8 from Yunhao Tian (t123yh@outlook.com) ---
(In reply to Minas Harutyunyan from comment #7)

> Could you please apply patch "[PATCH v2] usb: phy: Fix page fault from 
> usb_phy_uevent" from Artur Petrosyan and test again.
> 

Hi Minas, Thanks for your reply!

It doesn't seem to make a difference with the patch applied.

I enabled the dwc2 debug logging option in menuconfig, 
and captured the logs when I plug in, disconnect and re-plug in. 

The link to log file is
https://drive.google.com/file/d/1ID3bDp4NA6vSXf4AqN8w2WiDhaFbnb59/view?usp=sharing 

At [   32.964469] the gadget config was bound to the device;
At [   38.002792] the device was plugged to a PC;
At roughly [   43.063762] the device was disconnected; at [   45.640378] the
device was re-plugged.

After a short period of time the kernel freezes, no more logs can be output.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Bug 209555] dwc2 driver stops working after sudden disconnect
  2021-07-25  6:55 ` bugzilla-daemon
@ 2021-07-25  7:16   ` Minas Harutyunyan
  2021-07-25  7:23     ` Minas Harutyunyan
  0 siblings, 1 reply; 30+ messages in thread
From: Minas Harutyunyan @ 2021-07-25  7:16 UTC (permalink / raw)
  To: bugzilla-daemon, linux-usb

Hi Yunhao,

On 7/25/2021 10:55 AM, bugzilla-daemon@bugzilla.kernel.org wrote:
> https://urldefense.com/v3/__https://bugzilla.kernel.org/show_bug.cgi?id=209555__;!!A4F2R9G_pg!L6dlphg0375bx1FF7IECNRnSiIv6e_sCQ5e1ooYvcCkyTte-dEQp2ry8RyopRZNUdnLaQpSh$
> 
> --- Comment #8 from Yunhao Tian (t123yh@outlook.com) ---
> (In reply to Minas Harutyunyan from comment #7)
> 
>> Could you please apply patch "[PATCH v2] usb: phy: Fix page fault from
>> usb_phy_uevent" from Artur Petrosyan and test again.
>>
> 
> Hi Minas, Thanks for your reply!
> 
> It doesn't seem to make a difference with the patch applied.
> 
> I enabled the dwc2 debug logging option in menuconfig,
> and captured the logs when I plug in, disconnect and re-plug in.
> 
> The link to log file is
> https://urldefense.com/v3/__https://drive.google.com/file/d/1ID3bDp4NA6vSXf4AqN8w2WiDhaFbnb59/view?usp=sharing__;!!A4F2R9G_pg!L6dlphg0375bx1FF7IECNRnSiIv6e_sCQ5e1ooYvcCkyTte-dEQp2ry8RyopRZNUdp04G9mX$
> 

drive.google.com not accessible from my corporate laptop. Could you 
please put debug log on bugzilla.kernel.org?

Thanks,
Minas

> At [   32.964469] the gadget config was bound to the device;
> At [   38.002792] the device was plugged to a PC;
> At roughly [   43.063762] the device was disconnected; at [   45.640378] the
> device was re-plugged.
> 
> After a short period of time the kernel freezes, no more logs can be output.
> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (7 preceding siblings ...)
  2021-07-25  6:55 ` bugzilla-daemon
@ 2021-07-25  7:17 ` bugzilla-daemon
  2021-07-25  7:23 ` bugzilla-daemon
                   ` (16 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-07-25  7:17 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #9 from Minas Harutyunyan (Minas.Harutyunyan@synopsys.com) ---
Hi Yunhao,

On 7/25/2021 10:55 AM, bugzilla-daemon@bugzilla.kernel.org wrote:
>
> https://urldefense.com/v3/__https://bugzilla.kernel.org/show_bug.cgi?id=209555__;!!A4F2R9G_pg!L6dlphg0375bx1FF7IECNRnSiIv6e_sCQ5e1ooYvcCkyTte-dEQp2ry8RyopRZNUdnLaQpSh$
> 
> --- Comment #8 from Yunhao Tian (t123yh@outlook.com) ---
> (In reply to Minas Harutyunyan from comment #7)
> 
>> Could you please apply patch "[PATCH v2] usb: phy: Fix page fault from
>> usb_phy_uevent" from Artur Petrosyan and test again.
>>
> 
> Hi Minas, Thanks for your reply!
> 
> It doesn't seem to make a difference with the patch applied.
> 
> I enabled the dwc2 debug logging option in menuconfig,
> and captured the logs when I plug in, disconnect and re-plug in.
> 
> The link to log file is
>
> https://urldefense.com/v3/__https://drive.google.com/file/d/1ID3bDp4NA6vSXf4AqN8w2WiDhaFbnb59/view?usp=sharing__;!!A4F2R9G_pg!L6dlphg0375bx1FF7IECNRnSiIv6e_sCQ5e1ooYvcCkyTte-dEQp2ry8RyopRZNUdp04G9mX$
> 

drive.google.com not accessible from my corporate laptop. Could you 
please put debug log on bugzilla.kernel.org?

Thanks,
Minas

> At [   32.964469] the gadget config was bound to the device;
> At [   38.002792] the device was plugged to a PC;
> At roughly [   43.063762] the device was disconnected; at [   45.640378] the
> device was re-plugged.
> 
> After a short period of time the kernel freezes, no more logs can be output.
>

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* Re: [Bug 209555] dwc2 driver stops working after sudden disconnect
  2021-07-25  7:16   ` Minas Harutyunyan
@ 2021-07-25  7:23     ` Minas Harutyunyan
  0 siblings, 0 replies; 30+ messages in thread
From: Minas Harutyunyan @ 2021-07-25  7:23 UTC (permalink / raw)
  To: Minas Harutyunyan, bugzilla-daemon, linux-usb

On 7/25/2021 11:16 AM, Minas Harutyunyan wrote:
> Hi Yunhao,
> 
> On 7/25/2021 10:55 AM, bugzilla-daemon@bugzilla.kernel.org wrote:
>> https://urldefense.com/v3/__https://bugzilla.kernel.org/show_bug.cgi?id=209555__;!!A4F2R9G_pg!L6dlphg0375bx1FF7IECNRnSiIv6e_sCQ5e1ooYvcCkyTte-dEQp2ry8RyopRZNUdnLaQpSh$
>>
>> --- Comment #8 from Yunhao Tian (t123yh@outlook.com) ---
>> (In reply to Minas Harutyunyan from comment #7)
>>
>>> Could you please apply patch "[PATCH v2] usb: phy: Fix page fault from
>>> usb_phy_uevent" from Artur Petrosyan and test again.
>>>
>>
>> Hi Minas, Thanks for your reply!
>>
>> It doesn't seem to make a difference with the patch applied.
>>
>> I enabled the dwc2 debug logging option in menuconfig,
>> and captured the logs when I plug in, disconnect and re-plug in.
>>
>> The link to log file is
>> https://urldefense.com/v3/__https://drive.google.com/file/d/1ID3bDp4NA6vSXf4AqN8w2WiDhaFbnb59/view?usp=sharing__;!!A4F2R9G_pg!L6dlphg0375bx1FF7IECNRnSiIv6e_sCQ5e1ooYvcCkyTte-dEQp2ry8RyopRZNUdp04G9mX$
>>
> 
> drive.google.com not accessible from my corporate laptop. Could you
> please put debug log on bugzilla.kernel.org?
> 

Also please send your params dump.

> Thanks,
> Minas
> 
>> At [   32.964469] the gadget config was bound to the device;
>> At [   38.002792] the device was plugged to a PC;
>> At roughly [   43.063762] the device was disconnected; at [   45.640378] the
>> device was re-plugged.
>>
>> After a short period of time the kernel freezes, no more logs can be output.
>>
> 


^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (8 preceding siblings ...)
  2021-07-25  7:17 ` bugzilla-daemon
@ 2021-07-25  7:23 ` bugzilla-daemon
  2021-07-25  8:52 ` bugzilla-daemon
                   ` (15 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-07-25  7:23 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #10 from Minas Harutyunyan (Minas.Harutyunyan@synopsys.com) ---
On 7/25/2021 11:16 AM, Minas Harutyunyan wrote:
> Hi Yunhao,
> 
> On 7/25/2021 10:55 AM, bugzilla-daemon@bugzilla.kernel.org wrote:
>>
>> https://urldefense.com/v3/__https://bugzilla.kernel.org/show_bug.cgi?id=209555__;!!A4F2R9G_pg!L6dlphg0375bx1FF7IECNRnSiIv6e_sCQ5e1ooYvcCkyTte-dEQp2ry8RyopRZNUdnLaQpSh$
>>
>> --- Comment #8 from Yunhao Tian (t123yh@outlook.com) ---
>> (In reply to Minas Harutyunyan from comment #7)
>>
>>> Could you please apply patch "[PATCH v2] usb: phy: Fix page fault from
>>> usb_phy_uevent" from Artur Petrosyan and test again.
>>>
>>
>> Hi Minas, Thanks for your reply!
>>
>> It doesn't seem to make a difference with the patch applied.
>>
>> I enabled the dwc2 debug logging option in menuconfig,
>> and captured the logs when I plug in, disconnect and re-plug in.
>>
>> The link to log file is
>>
>> https://urldefense.com/v3/__https://drive.google.com/file/d/1ID3bDp4NA6vSXf4AqN8w2WiDhaFbnb59/view?usp=sharing__;!!A4F2R9G_pg!L6dlphg0375bx1FF7IECNRnSiIv6e_sCQ5e1ooYvcCkyTte-dEQp2ry8RyopRZNUdp04G9mX$
>>
> 
> drive.google.com not accessible from my corporate laptop. Could you
> please put debug log on bugzilla.kernel.org?
> 

Also please send your params dump.

> Thanks,
> Minas
> 
>> At [   32.964469] the gadget config was bound to the device;
>> At [   38.002792] the device was plugged to a PC;
>> At roughly [   43.063762] the device was disconnected; at [   45.640378] the
>> device was re-plugged.
>>
>> After a short period of time the kernel freezes, no more logs can be output.
>>
>

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (9 preceding siblings ...)
  2021-07-25  7:23 ` bugzilla-daemon
@ 2021-07-25  8:52 ` bugzilla-daemon
  2021-07-25 14:25 ` bugzilla-daemon
                   ` (14 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-07-25  8:52 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #15 from Yunhao Tian (t123yh@outlook.com) ---
Hi Minas,

Params and regdump is sent as an attachment.

I'm unable to get regdump after detach, because the system freezes after
disconnecting USB now, with message dwc2_flush_rx_fifo:  HANG! AHB Idle GRSCTL
flooding.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (10 preceding siblings ...)
  2021-07-25  8:52 ` bugzilla-daemon
@ 2021-07-25 14:25 ` bugzilla-daemon
  2021-07-25 15:14 ` bugzilla-daemon
                   ` (13 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-07-25 14:25 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #18 from Minas Harutyunyan (Minas.Harutyunyan@synopsys.com) ---
Hi Yunhao,

Thank you for provided info.

Driver by default set to DDMA mode. In DDMA mode very important when requests
producer (function driver) produce more requests that consumer (HW) can
process, otherwise BNA (buffer not available) interrupt will be asserted.
In your case function driver queued only 2 requests for EP2OUT. Driver create
descriptor list with 2 descriptors. On completion of 2nd descriptor core
returning to first one, which already completed and not renewed yet. Because of
this BNA asserted. For OUT EP's on BNA interrupt RxFIFO should be flushed, but
due to AHB not idle - core permanently try to get new descriptor, but no new
descriptor created yet. This create infinite loop.
So, I suggest you, to allow your function driver produce more requests before
first ISOC OUT packets will received in RxFIFO to have enough big pool of
descriptors.
If you can't control initial requests count from function driver then you can
try set core to BDMA mode:
g_dma_desc                    : 1 --> 0

In BDMA mode BNA will not asserted.

Thanks,
Minas

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (11 preceding siblings ...)
  2021-07-25 14:25 ` bugzilla-daemon
@ 2021-07-25 15:14 ` bugzilla-daemon
  2021-07-26  5:08 ` bugzilla-daemon
                   ` (12 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-07-25 15:14 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #21 from Minas Harutyunyan (Minas.Harutyunyan@synopsys.com) ---
Hi Yunhao,

For uac2

#define UAC2_DEF_REQ_NUM 2

set to i.e. 16

Thanks,
Minas

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (12 preceding siblings ...)
  2021-07-25 15:14 ` bugzilla-daemon
@ 2021-07-26  5:08 ` bugzilla-daemon
  2021-12-02 23:42 ` bugzilla-daemon
                   ` (11 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-07-26  5:08 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #22 from Yunhao Tian (t123yh@outlook.com) ---
Hi Minas,

I changed UAC2_DEF_REQ_NUM to 8, still not working. The log is attached.

To make sure this value is actually changed, I added two debug prints in
u_audio.c. You can see the two printk's in the attached log.

for (i = 0; i < params->req_number; i++) {
  printk("REQ NUM (c) %d\n", i);  // <=== Added
    if (!prm->reqs[i]) {
      printk("ALLOC %d\n", i);    // <=== Added
      req = usb_ep_alloc_request(ep, GFP_ATOMIC);


The symptom is still the same, getting BNA interrupt. The log is attached.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (13 preceding siblings ...)
  2021-07-26  5:08 ` bugzilla-daemon
@ 2021-12-02 23:42 ` bugzilla-daemon
  2021-12-03  0:20 ` bugzilla-daemon
                   ` (10 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-12-02 23:42 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

remyvarma@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |remyvarma@gmail.com

--- Comment #24 from remyvarma@gmail.com ---
Hi - was this ever resolved? I think I am facing the same issue. When I unplug
the cable, I see:
[  126.362313] dwc2 ff580000.usb: dwc2_hsotg_ep_stop_xfr: timeout
GINTSTS.GOUTNAKEFF
[  126.370999] dwc2 ff580000.usb: dwc2_hsotg_ep_stop_xfr: timeout
DOEPCTL.EPDisable
[  126.379585] dwc2 ff580000.usb: dwc2_hsotg_ep_stop_xfr: timeout
GINTSTS.GOUTNAKEFF
[  126.388225] dwc2 ff580000.usb: dwc2_hsotg_ep_stop_xfr: timeout
DOEPCTL.EPDisable

And the machine hangs. Using with g_serial, dr_mode is "peripheral". On 5.15. I
have disabled lpm also.
Thanks!

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (14 preceding siblings ...)
  2021-12-02 23:42 ` bugzilla-daemon
@ 2021-12-03  0:20 ` bugzilla-daemon
  2021-12-03  0:40 ` bugzilla-daemon
                   ` (9 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-12-03  0:20 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #25 from Yunhao Tian (t123yh@outlook.com) ---
Hi remyvarma,

Are you using a rockchip device? I copied dwc2 driver from
https://github.com/rockchip-linux/kernel/tree/develop-4.19 , replaced the
mainline dwc2, did some porting work, and everything starts working. I'm not
very sure what's the difference, but it just works.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (15 preceding siblings ...)
  2021-12-03  0:20 ` bugzilla-daemon
@ 2021-12-03  0:40 ` bugzilla-daemon
  2021-12-03  0:43 ` bugzilla-daemon
                   ` (8 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-12-03  0:40 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #26 from remyvarma@gmail.com ---
I am... rk3288. I was thinking about doing the same thing (although it seems a
little hacky). I wonder if you wouldn't mind sharing your port for the time
being?

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (16 preceding siblings ...)
  2021-12-03  0:40 ` bugzilla-daemon
@ 2021-12-03  0:43 ` bugzilla-daemon
  2021-12-03  0:44 ` bugzilla-daemon
                   ` (7 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-12-03  0:43 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #27 from Yunhao Tian (t123yh@outlook.com) ---
You may refer to https://github.com/t123yh/linux/tree/for-rk3308 for a working
version of code. Meanwhile I hope that we might able to request some help from
@Minas?

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (17 preceding siblings ...)
  2021-12-03  0:43 ` bugzilla-daemon
@ 2021-12-03  0:44 ` bugzilla-daemon
  2021-12-03  1:08 ` bugzilla-daemon
                   ` (6 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-12-03  0:44 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #28 from Yunhao Tian (t123yh@outlook.com) ---
You may refer to https://github.com/t123yh/linux/tree/for-rk3308 for a working
version of code. Meanwhile I hope that we might able to request some help from
@Minas?

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (18 preceding siblings ...)
  2021-12-03  0:44 ` bugzilla-daemon
@ 2021-12-03  1:08 ` bugzilla-daemon
  2021-12-03  1:47 ` bugzilla-daemon
                   ` (5 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-12-03  1:08 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #29 from remyvarma@gmail.com ---
Thank you. Yes it would be great to find the root cause of this. I am happy to
help debug. Two things I noticed. Is it normal to have two messages like this:
[   54.976434] dwc2 ff400000.usb: new device is high-speed
[   55.090994] dwc2 ff400000.usb: new device is high-speed
(I also see the same thing on mine)

And also, I think possibly related to this:
https://lore.kernel.org/lkml/20200214160149.11681-67-sashal@kernel.org/
I saw DPTXFIFO 9: Size 256, Start 0x00000123 in my debug logs at some point,
even with that patch applied. I will reenable debug logging to try to find it

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (19 preceding siblings ...)
  2021-12-03  1:08 ` bugzilla-daemon
@ 2021-12-03  1:47 ` bugzilla-daemon
  2021-12-07  2:13 ` bugzilla-daemon
                   ` (4 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-12-03  1:47 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #30 from remyvarma@gmail.com ---
I see this:
[    8.469658] dwc2 ff580000.usb: Core Release: 3.10a (snpsid=4f54310a)
[    8.482710] dwc2 ff580000.usb: dwc2_core_reset()
[    8.488584] dwc2 ff580000.usb: Forcing mode to device
[    8.502210] dwc2 ff580000.usb: Waiting for device mode
[    8.507962] dwc2 ff580000.usb: Device mode set
[    8.512932] dwc2 ff580000.usb: Forcing mode to device
[    8.518577] dwc2 ff580000.usb: Waiting for device mode
[    8.518584] dwc2 ff580000.usb: Device mode set
[    8.518611] dwc2 ff580000.usb: NonPeriodic TXFIFO size: 16
[    8.518615] dwc2 ff580000.usb: RXFIFO size: 275
[    8.546968] dwc2 ff580000.usb: EPs: 10, dedicated fifos, 972 entries in
SPRAM
[    8.557497] dwc2 ff580000.usb: DCFG=0x08100000, DCTL=0x00000002,
DIEPMSK=00000000
[    8.569534] dwc2 ff580000.usb: GAHBCFG=0x00000000, GHWCFG1=0x00006664
[    8.576754] dwc2 ff580000.usb: GRXFSIZ=0x00000400, GNPTXFSIZ=0x00100400
[    8.584152] dwc2 ff580000.usb: DPTx[1] FSize=256, StAddr=0x00000410
[    8.589476] systemd[1]: Started Journal Service.
[    8.591155] dwc2 ff580000.usb: DPTx[2] FSize=256, StAddr=0x00000900
[    8.603313] dwc2 ff580000.usb: DPTx[3] FSize=256, StAddr=0x00000a00
[    8.610314] dwc2 ff580000.usb: DPTx[4] FSize=256, StAddr=0x00000b00
[    8.617312] dwc2 ff580000.usb: DPTx[5] FSize=256, StAddr=0x00000c00
[    8.624311] dwc2 ff580000.usb: DPTx[6] FSize=256, StAddr=0x00000d00
[    8.636845] dwc2 ff580000.usb: DPTx[7] FSize=0, StAddr=0x00000e00
[    8.643840] dwc2 ff580000.usb: DPTx[8] FSize=0, StAddr=0x00000f00
[    8.650652] dwc2 ff580000.usb: DPTx[9] FSize=256, StAddr=0x00000410

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (20 preceding siblings ...)
  2021-12-03  1:47 ` bugzilla-daemon
@ 2021-12-07  2:13 ` bugzilla-daemon
  2022-02-19 11:11 ` bugzilla-daemon
                   ` (3 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2021-12-07  2:13 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #31 from remyvarma@gmail.com ---
Hey just as another data point, I believe the odroid has a type c connector. My
device also has a type c connector.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (21 preceding siblings ...)
  2021-12-07  2:13 ` bugzilla-daemon
@ 2022-02-19 11:11 ` bugzilla-daemon
  2022-02-19 11:11 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2022-02-19 11:11 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #32 from Yunhao Tian (t123yh@outlook.com) ---
Hi,

Just discovered the real issue of my case. dwc2_gadget_enter_clock_gating
doesn't seem to be working for my RK3308, so disabling clock_gating does the
trick for me. 

Specifically, I added 

  p->no_clock_gating = true; 

in dwc2_set_rk_params, and everything now works.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (22 preceding siblings ...)
  2022-02-19 11:11 ` bugzilla-daemon
@ 2022-02-19 11:11 ` bugzilla-daemon
  2022-05-18 10:20 ` bugzilla-daemon
  2023-05-03  1:56 ` bugzilla-daemon
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2022-02-19 11:11 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

--- Comment #33 from Yunhao Tian (t123yh@outlook.com) ---
Hi,

Just discovered the real issue of my case. dwc2_gadget_enter_clock_gating
doesn't seem to be working for my RK3308, so disabling clock_gating does the
trick for me. 

Specifically, I added 

  p->no_clock_gating = true; 

in dwc2_set_rk_params, and everything now works.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (23 preceding siblings ...)
  2022-02-19 11:11 ` bugzilla-daemon
@ 2022-05-18 10:20 ` bugzilla-daemon
  2023-05-03  1:56 ` bugzilla-daemon
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2022-05-18 10:20 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

Yury Lunev (yury.lunev@gmail.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |yury.lunev@gmail.com

--- Comment #34 from Yury Lunev (yury.lunev@gmail.com) ---
Hello,

>       hsotg->params.power_down = 0; //val; WA

This workaround works for me on Odroid C4, linux 5.15.32.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

* [Bug 209555] dwc2 driver stops working after sudden disconnect
  2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
                   ` (24 preceding siblings ...)
  2022-05-18 10:20 ` bugzilla-daemon
@ 2023-05-03  1:56 ` bugzilla-daemon
  25 siblings, 0 replies; 30+ messages in thread
From: bugzilla-daemon @ 2023-05-03  1:56 UTC (permalink / raw)
  To: linux-usb

https://bugzilla.kernel.org/show_bug.cgi?id=209555

Chris C (chris.cope@rode.com) changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chris.cope@rode.com

--- Comment #35 from Chris C (chris.cope@rode.com) ---
Hi,

Just confirming I had the same problem as Yunhao Tian running a fairly vanilla
5.10 kernel on RK3308.  Solved for me like above:

Patch:  p->no_clock_gating = true; into params.c


Should definitely be considered for upstreaming as a RK3308 platform specific
param for DWC2.

-- 
You may reply to this email to add a comment.

You are receiving this mail because:
You are watching the assignee of the bug.

^ permalink raw reply	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2023-05-03  1:56 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-10-06 21:59 [Bug 209555] New: dwc2 driver stops working after sudden disconnect bugzilla-daemon
2020-10-07 20:00 ` [Bug 209555] " bugzilla-daemon
2020-10-08  7:46 ` bugzilla-daemon
2020-10-08 19:47 ` bugzilla-daemon
2020-10-09  6:47 ` bugzilla-daemon
2021-02-26  1:43 ` bugzilla-daemon
2021-07-24 16:42 ` bugzilla-daemon
2021-07-25  5:45   ` Minas Harutyunyan
2021-07-25  5:45 ` bugzilla-daemon
2021-07-25  6:55 ` bugzilla-daemon
2021-07-25  7:16   ` Minas Harutyunyan
2021-07-25  7:23     ` Minas Harutyunyan
2021-07-25  7:17 ` bugzilla-daemon
2021-07-25  7:23 ` bugzilla-daemon
2021-07-25  8:52 ` bugzilla-daemon
2021-07-25 14:25 ` bugzilla-daemon
2021-07-25 15:14 ` bugzilla-daemon
2021-07-26  5:08 ` bugzilla-daemon
2021-12-02 23:42 ` bugzilla-daemon
2021-12-03  0:20 ` bugzilla-daemon
2021-12-03  0:40 ` bugzilla-daemon
2021-12-03  0:43 ` bugzilla-daemon
2021-12-03  0:44 ` bugzilla-daemon
2021-12-03  1:08 ` bugzilla-daemon
2021-12-03  1:47 ` bugzilla-daemon
2021-12-07  2:13 ` bugzilla-daemon
2022-02-19 11:11 ` bugzilla-daemon
2022-02-19 11:11 ` bugzilla-daemon
2022-05-18 10:20 ` bugzilla-daemon
2023-05-03  1:56 ` bugzilla-daemon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).