Linux-2.5.41 now prints a warning with a strack trace when a
routine that could block, such as down(), is called from an interrupt
context.  usb_hub_events did this, with a comment claiming that the
down() call would never block.  The following patch replaces the
down call with "if(trylock_down(...)) BUG();", which eliminates the
warning, causes the code to correctly generate a BUG() if the claim
in the comment is false, and might even be a couple of cycles faster.

        I'm unsure what the preferred approval process is for changes
to drivers/usb/core/hub.c, but I see Brad Hards has the most recent
copyright notice on hub.c, so I'm emailing this to Brad and
linux-usb-devel.  I'd appreciate it someone would let me know either
that they're integrating this patch for submission to Linus or that
there is something else I should do to get this patch in the pipeline.

-- 
Adam J. Richter     __     ______________   575 Oroville Road
[EMAIL PROTECTED]     \ /                  Milpitas, California 95035
+1 408 309-6081         | g g d r a s i l   United States of America
                         "Free Software For The Rest Of Us."


-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to