Subject: Re: splraiseipl()
To: YAMAMOTO Takashi <yamt@mwd.biglobe.ne.jp>
From: Iain Hibbert <plunky@rya-online.net>
List: tech-kern
Date: 04/04/2006 09:57:35
On Wed, 29 Mar 2006, YAMAMOTO Takashi wrote:

> please test/review.

I have no opinion on that specific part, but something related that is
exposed by making splraiseipl() part of the API. From <dev/usb/usbdi.h>;

#ifdef USB_USE_SOFTINTR
#ifdef __HAVE_GENERIC_SOFT_INTERRUPTS
#define splusb splsoftnet
#else
#define	splusb splsoftclock
#endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */
#else
#define splusb splbio
#endif /* USB_USE_SOFTINTR */
#define splhardusb splbio
#define IPL_USB IPL_BIO

You can see that splraiseipl(IPL_USB) != splusb() which was biting me in
an intermittent way until I noticed it.

I'm not sure which would be a better way to fix this:

1. IPL_SOFTUSB/IPL_USB & splsoftusb()/splusb()

	This would seem to fit more with the current spl/IPL naming scheme
	though is pretty invasive as there are many references to splusb,
	and would cause issues with porting USB drivers from other BSDs

2. IPL_USB/IPL_HARDUSB & splusb()/splhardusb()

	This would be easier, since IPL_USB is currently only used in a
	few places under arch/ that I can see.

iain