Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Jan 2011 17:03:37 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        freebsd-usb@freebsd.org
Subject:   Adjust USB kthread priorities
Message-ID:  <201101121703.37226.jhb@freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201101121703.37226.jhb>