On Thu, May 16, 2002, David Brownell <[EMAIL PROTECTED]> wrote:
> However, for the inevitable buggy device drivers, this guarantees
> the cleanup would never be done in_interrupt().  

I think you still misunderstand the guarantees the reference counting
code provide.

You can call usb_inc_dev_use and usb_dec_dev_use in either a thread or
an interrupt context. And since usb_dec_dev_use will call deallocate()
(and some other code), deallocate() can be called in either a thread or an
interrupt context.

The fact that it mostly happens in a thread context is to be considered
dumb luck.

A quick recap: The reference counting code makes no guaratees in which
context the count will hit 0, thusly no guarantees that deallocate()
will be in a thread context (before your patch atleast).

Don't confuse your implementation of sohci_free_dev (which needs to be
called in a thread context) from the requirements of the hardware
(triggering the start of an unlink).

JE


_______________________________________________________________

Have big pipes? SourceForge.net is looking for download mirrors. We supply
the hardware. You get the recognition. Email Us: [EMAIL PROTECTED]
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to