From owner-freebsd-usb@FreeBSD.ORG Wed Jan 12 22:03:39 2011 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 55BEA106566B for ; Wed, 12 Jan 2011 22:03:39 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 286F88FC19 for ; Wed, 12 Jan 2011 22:03:39 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id C118946B3B for ; Wed, 12 Jan 2011 17:03:38 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id AE08F8A01D for ; Wed, 12 Jan 2011 17:03:37 -0500 (EST) From: John Baldwin To: freebsd-usb@freebsd.org Date: Wed, 12 Jan 2011 17:03:37 -0500 User-Agent: KMail/1.13.5 (FreeBSD/7.4-CBSD-20110107; KDE/4.4.5; amd64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201101121703.37226.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 12 Jan 2011 17:03:37 -0500 (EST) X-Virus-Scanned: clamav-milter 0.96.3 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=0.7 required=4.2 tests=BAYES_00,TO_NO_BRKTS_DIRECT autolearn=no version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on bigwig.baldwin.cx Subject: Adjust USB kthread priorities X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 12 Jan 2011 22:03:39 -0000 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 #include +#include /* 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