From: Dan Carpenter <dan.carpenter@oracle.com>
To: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Minas Harutyunyan <hminas@synopsys.com>,
Felipe Balbi <felipe.balbi@linux.intel.com>,
Geert Uytterhoeven <geert@linux-m68k.org>,
Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: usb: dwc2: Revert "usb: dwc2: Disable all EP's on disconnect"
Date: Thu, 6 Dec 2018 17:52:18 +0300 [thread overview]
Message-ID: <20181206145218.GQ3073@unbuntlaptop> (raw)
Hi Marek,
I'm surprised you don't get deadlocks when you apply this patch.
On Wed, Nov 21, 2018 at 04:45:04PM +0100, Marek Szyprowski wrote:
> @@ -4020,9 +4008,7 @@ static int dwc2_hsotg_ep_disable(struct usb_ep *ep)
>
> epctrl_reg = dir_in ? DIEPCTL(index) : DOEPCTL(index);
>
> - locked = spin_is_locked(&hsotg->lock);
> - if (!locked)
> - spin_lock_irqsave(&hsotg->lock, flags);
> + spin_lock_irqsave(&hsotg->lock, flags);
>
One of the callers is already holding the hsotg->log. The
spin_is_locked() test would avoid the deadlock.
regards,
dan carpenter
next reply other threads:[~2018-12-06 14:52 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 14:52 Dan Carpenter [this message]
-- strict thread matches above, loose matches on Subject: below --
2018-12-07 14:40 usb: dwc2: Revert "usb: dwc2: Disable all EP's on disconnect" Dan Carpenter
2018-12-07 14:13 Minas Harutyunyan
2018-12-07 11:20 Minas Harutyunyan
2018-12-07 10:15 Dan Carpenter
2018-12-07 10:11 Felipe Balbi
2018-12-07 9:58 Minas Harutyunyan
2018-12-07 9:50 Felipe Balbi
2018-12-07 9:06 Minas Harutyunyan
2018-12-07 9:06 Minas Harutyunyan
2018-12-06 23:09 Maynard CABIENTE
2018-12-06 15:07 Marek Szyprowski
2018-12-06 15:03 Marek Szyprowski
2018-12-05 12:52 Minas Harutyunyan
2018-12-04 13:29 Dan Carpenter
2018-12-04 12:34 Minas Harutyunyan
2018-11-23 14:43 Dan Carpenter
2018-11-23 9:49 Marek Szyprowski
2018-11-22 6:53 Minas Harutyunyan
2018-11-21 15:45 Marek Szyprowski
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=20181206145218.GQ3073@unbuntlaptop \
--to=dan.carpenter@oracle.com \
--cc=b.zolnierkie@samsung.com \
--cc=felipe.balbi@linux.intel.com \
--cc=geert@linux-m68k.org \
--cc=gregkh@linuxfoundation.org \
--cc=hminas@synopsys.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=m.szyprowski@samsung.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;
as well as URLs for NNTP newsgroup(s).