[lkml]   [2018]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 4.15 020/128] usb: dwc3: Fix lock-up on ID change during system suspend/resume
4.15-stable review patch.  If anyone has any objections, please let me know.


From: Roger Quadros <>

commit 084a804e01205bcd74cd0849bc72cb5c88f8e648 upstream.

To reproduce the lock up do the following
- connect otg host adapter and a USB device to the dual-role port
so that it is in host mode.
- suspend to mem.
- disconnect otg adapter.
- resume the system.

If we call dwc3_host_exit() before tasks are thawed
xhci_plat_remove() seems to lock up at the second usb_remove_hcd() call.

To work around this we queue the _dwc3_set_mode() work on
the system_freezable_wq.

Fixes: 41ce1456e1db ("usb: dwc3: core: make dwc3_set_mode() work properly")
Cc: <> # v4.12+
Suggested-by: Manu Gautam <>
Signed-off-by: Roger Quadros <>
Signed-off-by: Felipe Balbi <>
Signed-off-by: Greg Kroah-Hartman <>

drivers/usb/dwc3/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/usb/dwc3/core.c
+++ b/drivers/usb/dwc3/core.c
@@ -174,7 +174,7 @@ void dwc3_set_mode(struct dwc3 *dwc, u32
dwc->desired_dr_role = mode;
spin_unlock_irqrestore(&dwc->lock, flags);

- queue_work(system_power_efficient_wq, &dwc->drd_work);
+ queue_work(system_freezable_wq, &dwc->drd_work);

u32 dwc3_core_fifo_space(struct dwc3_ep *dep, u8 type)

 \ /
  Last update: 2018-03-16 17:15    [W:0.567 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site