MLK-17110 usb: dwc3: use system_freezable_wq for role change work
authorLi Jun <jun.li@nxp.com>
Fri, 8 Dec 2017 08:56:06 +0000 (16:56 +0800)
committerNitin Garg <nitin.garg@nxp.com>
Tue, 20 Mar 2018 19:50:31 +0000 (14:50 -0500)
To avoid deadlock after system resume if the role changes notification
is sent while system resume, we need to drain the work handling until
thawed.

Acked-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
drivers/usb/dwc3/core.c

index 39a0349..65584d2 100644 (file)
@@ -173,7 +173,7 @@ void dwc3_set_mode(struct dwc3 *dwc, u32 mode)
        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);
 }
 
 static int dwc3_set_suspend_clk(struct dwc3 *dwc)