Subject: [BUG] pxa27x_udc: possible recursive locking detected in pxa_ep_queue

From: [email-masked] (David Brownell)
Date: Sun, 6 Dec 2009 12:23:00 -0800

On Sunday 06 December 2009, Alan Stern wrote:
> That's what other device controller drivers do. ?There's no choice. ?
> (Except that I'm not sure they have individual locks for endpoints -- 
> just one single big spinlock.)

Right; such fine grain locking tends to be more hassle than it's
worth.  ISTR studies from a while back showing locks need to be
quite heavily contended before splitting them is worth much.  Any
per-controller lock for a UDC is unlikely to see much contention.

> In fact, host controller drivers do the analogous thing. ?When they
> give back completed URBs, they release their private spinlocks.

For *exactly* the same reason.  Upper level driver code shouldn't
need to worry about whether it's re-entering some random bit of
lower level code.  As a rule, it can't know about that code.