On Fri, 6 Jul 2007, David Brownell wrote:

> On Monday 02 July 2007, Alan Cox wrote:
> 
> > Why not just bite the bullet and change the callback convention. The lock
> > verification code should catch the cases that matter and which are
> > overlooked on a code scan. You could also change the name of the callback
> > to be sure it breaks anything out of tree that isn't fixed.
> 
> The cases Alan identified are inside usbcore, mostly for root hubs.
> Those would be easy to convert.

Right; there are only a few of them.  The hard part is converting the 
completion routines themselves, of which there are many.

> By far the majority of URB completions are issued from HCDs, from
> IRQ handlers ... which in RT kernels will be thread contexts, but
> in normal kernels will be hardirq contexts.
> 
> I'm not sure the lock validator would necessarily catch all the
> relevant cases.  Fault paths are troublesome...

Agreed.  For example, the fact that a spinlock is sometimes taken with
IRQs disabled and sometimes with IRQs enabled won't necessarily show up
in a casual test.

> On the other hand, that *could* dovetail nicely with the proposed
> change of the callback signature to take urb and status code,
> rather than urb with urb->status ... :)

Augh!!  Too many changes, all at once!  I can't face it!  :-)

Alan Stern


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to