From: Greg KH <gregkh@linuxfoundation.org>
To: Xu Yang <xu.yang_2@nxp.com>
Cc: Thinh.Nguyen@synopsys.com, linux-usb@vger.kernel.org,
jun.li@nxp.com, imx@lists.linux.dev
Subject: Re: [PATCH v2] usb: dwc3: core: remove spin_lock/unlock_* to avoid deadlock when suspend gadget
Date: Wed, 31 Jul 2024 10:30:54 +0200 [thread overview]
Message-ID: <2024073141-demeanor-amniotic-8f01@gregkh> (raw)
In-Reply-To: <20240527170413.1107831-1-xu.yang_2@nxp.com>
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@vger.kernel.org
> Signed-off-by: Xu Yang <xu.yang_2@nxp.com>
>
> ---
> 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
next prev parent reply other threads:[~2024-07-31 8:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-27 17:04 [PATCH v2] usb: dwc3: core: remove spin_lock/unlock_* to avoid deadlock when suspend gadget Xu Yang
2024-05-28 23:09 ` Thinh Nguyen
2024-07-31 8:30 ` Greg KH [this message]
2024-07-31 8:55 ` Xu Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2024073141-demeanor-amniotic-8f01@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=Thinh.Nguyen@synopsys.com \
--cc=imx@lists.linux.dev \
--cc=jun.li@nxp.com \
--cc=linux-usb@vger.kernel.org \
--cc=xu.yang_2@nxp.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox