From owner-freebsd-usb@FreeBSD.ORG Fri Apr 1 22:06:08 2005 Return-Path: Delivered-To: freebsd-usb@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 399F516A4CE; Fri, 1 Apr 2005 22:06:08 +0000 (GMT) Received: from harmony.village.org (rover.village.org [168.103.84.182]) by mx1.FreeBSD.org (Postfix) with ESMTP id C6C7343D55; Fri, 1 Apr 2005 22:06:07 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1]) by harmony.village.org (8.13.3/8.13.1) with ESMTP id j31M2sw7033984; Fri, 1 Apr 2005 15:02:54 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Fri, 01 Apr 2005 15:02:54 -0700 (MST) Message-Id: <20050401.150254.74727545.imp@bsdimp.com> To: ticso@cicely.de, ticso@cicely12.cicely.de From: Warner Losh In-Reply-To: <20050401213138.GQ2072@cicely12.cicely.de> References: <200504012144.11468.sebastien.b@swissinfo.org> <200504012317.54966.hselasky@c2i.net> <20050401213138.GQ2072@cicely12.cicely.de> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: sebastien.b@swissinfo.org cc: freebsd-usb@FreeBSD.ORG cc: iedowse@FreeBSD.ORG Subject: Re: panic: uhci_abort_xfer: not in process context X-BeenThere: freebsd-usb@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: FreeBSD support for USB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 01 Apr 2005 22:06:08 -0000 > > The solution is to use DELAY() instead of tsleep() and usb_delay_ms(). > > This is wrong either way - wasting cycles in interrupt context is bad. > IMO the timeout function should trigger a softint doing the real job. > Maybe Ian has an idea about this - he did a lot in respect to timeout > and aborting xfers lately and should be familar with this point. > To be shure it still exists you should verify with latest code. I have a set of patches that convert the bridge interrupt routines into a taskqueue. I did that so that we can mark them as non-giant holding ISRs. This would be a reasonable context to do things like sleeping from. However, you'd want to avoid that as much as possible because sleeping for one request would block all the others in the queue.... Warner