Re: Spinlock recursion in usbnet + rndis-wlan

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, 15 Jan 2009 16:15:46 -0500 (EST), Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:

> Then the submitting method must release its lock before doing the 
> submission.  It has never been specified in the USB kernel 
> documentation that callbacks will occur in a different context from 
> submissions or unlinks.

This is a thorny issue in some contexts. Sometimes some kind of a
framework holds a lock for you. In ub I eventually ended bouncing
USB callbacks off a tasklet. This is faster than workqueue, has
no issues with cancelling.

> But it does seem unlikely that any HCD will ever complete an URB 
> during the submission, because of the bus transmission time if nothing 
> else.

I would rather not rely on this, with all the new fishy HCDs
we have out there. I would not put it past them to busy-wait
somewhere long enough to catch a quickly occuring error callback.
I almost can swear it has actually happened to me in ub, too.

-- Pete
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux