From: Kevin Hilman <khilman@mvista.com>
To: David Brownell <david-b@pacbell.net>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: [PATCH 2/2] ARM: OMAP: MUSB: BUG on potential deadlocks
Date: Fri, 31 Aug 2007 11:41:43 -0700 [thread overview]
Message-ID: <46D860E7.6080306@mvista.com> (raw)
In-Reply-To: <20070831174932.3FEA123719C@adsl-69-226-248-13.dsl.pltn13.pacbell.net>
David Brownell wrote:
>>> This isn't a good patch. *ADDING* a BUG() is wrong, and that's
>>> especially true for things like spin_is_locked()
>> I probably should've made this an RFC instead of a patch. I meant for
>> this to be a debug aid, not to actually go into the tree. I'm using
>> this to try to track down some deadlocks and thought it may be useful to
>> others. It has already turned up a couple problems (see below.)
>
> OK, that's better. As I presume you've deduced, a lot of the recent
> cleanup effort in this driver is so we can try pushing it upstream
> for 2.6.24 ... abuse of BUG() wouldn't help that!
>
>
>>> It'd be much better to actually submit fixes for any locking bugs
>>> than to add BUG_ON() statements.
>> I agree, and I'm working on the fixes. Just not sure I have the right
>> fix yet.
>>
>> For exaple, I've found a couple paths where the BUG_ON() has definitely
>> turned up a problem:
>>
>> dma_controller_irq
>> musb_dma_completion
>> musb_g_rx (or musb_host_rx in host mode)
>> musb_g_giveback (musb_advance_schedule --> musb_giveback)
>>
>> In both host and gadget cases, the giveback function is entered without
>> the lock being held and tries to unlock the lock. The comment in
>> musb_dma_completion says that the lock is held, but it's not when called
>> from the DMA IRQ ( but is when called from davinci_irq via
>> cppi_completion.)
>
> I presume you mean the OMAP2430 support? Looked to me like TUSB6010
> got that OK too. That code for Mentor's DMA engine still has obvious
> bugs; and I don't know that it's ever had more than basic cleanups.
Yes, this is 2430.
So is nobody else trying to use the Mentor's DMA engine? I know it's
typically disabled on DaVinci, but is it used on tusb?
Kevin
next prev parent reply other threads:[~2007-08-31 18:41 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-31 2:53 [PATCH 0/2] MUSB: tracking down locking bugs Kevin Hilman
2007-08-31 2:54 ` [PATCH 1/2] ARM: OMAP: MUSB: dont exit with spinlock held Kevin Hilman
2007-08-31 5:47 ` David Brownell
2007-08-31 5:51 ` Kevin Hilman
2007-08-31 2:54 ` [PATCH 2/2] ARM: OMAP: MUSB: BUG on potential deadlocks Kevin Hilman
2007-08-31 6:05 ` David Brownell
2007-08-31 16:18 ` Kevin Hilman
2007-08-31 17:49 ` David Brownell
2007-08-31 18:41 ` Kevin Hilman [this message]
2007-08-31 20:10 ` David Brownell
2007-08-31 5:48 ` [PATCH 0/2] MUSB: tracking down locking bugs David Brownell
2007-08-31 6:04 ` Kevin Hilman
2007-08-31 6:38 ` David Brownell
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=46D860E7.6080306@mvista.com \
--to=khilman@mvista.com \
--cc=david-b@pacbell.net \
--cc=linux-omap-open-source@linux.omap.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