Re: [PATCH v2] usb: dwc3: core: remove spin_lock/unlock_* to avoid deadlock when suspend gadget

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, May 28, 2024 at 01:04:13AM +0800, Xu Yang wrote:
> In current design, spin_lock_irqsave() will run twice when suspend gadget
> device if the controller is using OTG block:
> 
> dwc3_suspend_common()
>   spin_lock_irqsave(&dwc->lock, flags);      <-- 1st
>   dwc3_gadget_suspend(dwc);
>     dwc3_gadget_soft_disconnect(dwc);
>       spin_lock_irqsave(&dwc->lock, flags);  <-- 2nd
> 
> This will cause deadlock on the suspend path. To let it work, just remove
> spin_lock/unlock_* in dwc3_suspend_common() since they are redundant.
> 
> Fixes: 5265397f9442 ("usb: dwc3: Remove DWC3 locking during gadget suspend/resume")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Xu Yang <xu.yang_2@xxxxxxx>
> 
> ---
> Changes in v2:
>  - add fix tag and stable list
> ---
>  drivers/usb/dwc3/core.c | 3 ---
>  1 file changed, 3 deletions(-)

Is this still needed?  if so, can you rebase and resubmit?

thanks,

greg k-h




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux