Messages in this thread | | | Subject | Re: [PATCH 2/2] usb: dwc3: drd: Fix lock-up on ID change during system suspend/resume | From | Roger Quadros <> | Date | Wed, 24 Jan 2018 14:19:24 +0200 |
| |
On 23/01/18 14:41, Roger Quadros wrote: > Hi Manu, > > On 23/01/18 05:45, Manu Gautam wrote: >> Hi, >> >> >> On 1/22/2018 6:31 PM, Roger Quadros wrote: >>> Adding/removing host/gadget controller before .pm_complete() >>> causes a lock-up. Let's prevent any dual-role state change >>> between .pm_prepare() and .pm_complete() to fix this. >> >> What kind of lock-up are you seeing? Some hardware lockup or software deadlock? >> IMO using a freezable_wq for drd_work should address that? >> > > I was seeing a software deadlock. freezable_wq is a good idea. I'll try it out.
using freezable_wq doesn't get rid of the deadlock. If I use freezable_wq plus add some delay before I do a dwc3_host_init() in the work function then it starts to work.
As dependence on delay looks fragile so I'll stick to the current implementation based on .pm_prepare/complete().
-- cheers, -roger
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
| |