diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2009-08-30 19:15:41 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2009-08-30 19:15:41 +0000 |
commit | 8acf7ad7da20700612be54fb6215c4129d3f5908 (patch) | |
tree | f0c1447d57d63491c3cbb0e0d51bb803297b2c94 /sys/dev | |
parent | 6ab93a2ea641207aff70046b23b1067483e0a639 (diff) |
Reinstate SPLUSBCHECK checks (DIAGNOSTIC-only), but implemented as splassert(),
which is exactly what it was trying to do.
Tested on all *hci controllers with a bunch of usb devices by at least ckuethe@
and I.
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/usb/usbdi.h | 4 | ||||
-rw-r--r-- | sys/dev/usb/usbdivar.h | 16 |
2 files changed, 4 insertions, 16 deletions
diff --git a/sys/dev/usb/usbdi.h b/sys/dev/usb/usbdi.h index b89dc40c290..f1adbcf11a5 100644 --- a/sys/dev/usb/usbdi.h +++ b/sys/dev/usb/usbdi.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdi.h,v 1.30 2008/06/26 05:42:19 ray Exp $ */ +/* $OpenBSD: usbdi.h,v 1.31 2009/08/30 19:15:40 miod Exp $ */ /* $NetBSD: usbdi.h,v 1.62 2002/07/11 21:14:35 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdi.h,v 1.18 1999/11/17 22:33:49 n_hibma Exp $ */ @@ -242,8 +242,10 @@ struct usb_attach_arg { /* XXX Perhaps USB should have its own levels? */ #ifdef __HAVE_GENERIC_SOFT_INTERRUPTS #define splusb splsoftnet +#define SPLUSBCHECK splsoftassert(IPL_SOFTNET) #else #define splusb splbio +#define SPLUSBCHECK splassert(IPL_BIO) #endif /* __HAVE_GENERIC_SOFT_INTERRUPTS */ #define splhardusb splbio #define IPL_USB IPL_BIO diff --git a/sys/dev/usb/usbdivar.h b/sys/dev/usb/usbdivar.h index feed6655134..9d44ae0191a 100644 --- a/sys/dev/usb/usbdivar.h +++ b/sys/dev/usb/usbdivar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: usbdivar.h,v 1.34 2008/06/29 10:04:15 yuo Exp $ */ +/* $OpenBSD: usbdivar.h,v 1.35 2009/08/30 19:15:40 miod Exp $ */ /* $NetBSD: usbdivar.h,v 1.70 2002/07/11 21:14:36 augustss Exp $ */ /* $FreeBSD: src/sys/dev/usb/usbdivar.h,v 1.11 1999/11/17 22:33:51 n_hibma Exp $ */ @@ -254,20 +254,6 @@ void usb_needs_explore(usbd_device_handle); void usb_needs_reattach(usbd_device_handle); void usb_schedsoftintr(struct usbd_bus *); -/* - * XXX This check is extremely bogus. Bad Bad Bad. - */ -#if defined(DIAGNOSTIC) && 0 -#define SPLUSBCHECK \ - do { int _s = splusb(), _su = splusb(); \ - if (!cold && _s != _su) printf("SPLUSBCHECK failed 0x%x!=0x%x, %s:%d\n", \ - _s, _su, __FILE__, __LINE__); \ - splx(_s); \ - } while (0) -#else -#define SPLUSBCHECK -#endif - /* Locator stuff. */ /* XXX these values are used to statically bind some elements in the USB tree |