Yes indeed.
So it should. Do you know how to test whether interrupts are enabled?
There's a routine called raw_irqs_disabled() defined in
include/asm/irqflags.h. Stick it inside usb_hcd_link_urb_to_ep, and
the first time it returns nonzero, do a dump_stack().
That should do the trick. Although it would be quicker just to make a
small change to your existing code: The first time the spin_trylock
fails, do a dump_stack(). You did say this is a UP system, right?
(Because obviously on SMP systems, one expects spin_trylock to fail
from time to time.)
The only callers of usb_hcd_link_urb_to_ep are the host controller
drivers plus a couple of routines in hcd.c itself. But all the
callers are in the scope of spin_lock_irqsave or spin_lock_irq! So
maybe there's more going on here than meets the eye.
Alan Stern
--