Subject: USB spl problem
To: None <tech-kern@NetBSD.ORG>
From: Lennart Augustsson <augustss@cs.chalmers.se>
List: tech-kern
Date: 07/24/1998 00:34:10
I have a problem with the USB interrupt level.  The problem is that a
USB interrupt may need differnet levels depending on which device it
was that caused the interrupt.  USB devices can be of many different
kinds:
        communication   (spltty)
        network device  (splnet)
        audio           (splaudio)
        disks           (splbio)
        ...

My proposed solution is that the USB interrupt level should be lower
than all other hardware levels.  This way we can ensure that it will
not interrupt in a bad place.  Each USB device driver will the raise
the level in its interrupt routine if needed.  E.g., the USB com driver
will do an spltty() before running any critical code in the interrupt
routine, the USB audio driver will do an splaudio() etc.

First question, will this work?

Second question, how can I find a level that is lower than all
others?  splbio() is the lowest one according to the spl(9) man
page (and this is what I use right now), but I would feel
better if there was a proper splusb() that was lower than all
others.

        -- Lennart