Adjust USB kthread priorities

John Baldwin jhb at freebsd.org
Wed Jan 12 22:03:39 UTC 2011


Currently the USB kthreads created for each USB bus use hardware interrupt
priorities.  I think this is wrong and that they should use software interrupt
priorities instead.  This patch would do that:

--- //depot/projects/smpng/sys/dev/usb/usb_process.h	2009-08-25 21:12:15.000000000 0000
+++ //depot/user/jhb/socket/dev/usb/usb_process.h	2010-12-21 20:30:04.000000000 0000
@@ -27,11 +27,13 @@
 #ifndef _USB_PROCESS_H_
 #define	_USB_PROCESS_H_
 
+#include <sys/interrupt.h>
 #include <sys/priority.h>
+#include <sys/runq.h>
 
 /* defines */
-#define	USB_PRI_HIGH PI_NET
-#define	USB_PRI_MED PI_DISK
+#define	USB_PRI_HIGH	PI_SWI(SWI_NET)
+#define	USB_PRI_MED	PI_SWI(SWI_CAMBIO)
 
 #define	USB_PROC_WAIT_TIMEOUT 2
 #define	USB_PROC_WAIT_DRAIN   1

-- 
John Baldwin


More information about the freebsd-usb mailing list