From owner-freebsd-stable@FreeBSD.ORG Sat Aug 20 17:21:15 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 484E71065670; Sat, 20 Aug 2011 17:21:15 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe07.c2i.net [212.247.154.194]) by mx1.freebsd.org (Postfix) with ESMTP id 9EF1E8FC0A; Sat, 20 Aug 2011 17:21:14 +0000 (UTC) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.1 cv=ND3JYWI3bJ4ZiXLCJEAs5I5grFUWsY+sOY5HCnTiTok= c=1 sm=1 a=SvYTsOw2Z4kA:10 a=EPV5yV1zpIAA:10 a=WQU8e4WWZSUA:10 a=8nJEP1OIZ-IA:10 a=CL8lFSKtTFcA:10 a=i9M/sDlu2rpZ9XS819oYzg==:17 a=_c88UKqYe0xIkabUrEwA:9 a=wPNLvfGTeEIA:10 a=i9M/sDlu2rpZ9XS819oYzg==:117 Received: from [188.126.198.129] (account mc467741@c2i.net HELO laptop002.hselasky.homeunix.org) by mailfe07.swip.net (CommuniGate Pro SMTP 5.2.19) with ESMTPA id 168343860; Sat, 20 Aug 2011 19:21:12 +0200 From: Hans Petter Selasky To: Andriy Gapon Date: Sat, 20 Aug 2011 19:18:43 +0200 User-Agent: KMail/1.13.5 (FreeBSD/8.2-STABLE; KDE/4.4.5; amd64; ; ) References: <201108201854.21180.hselasky@c2i.net> <4E4FEA2E.7050209@FreeBSD.org> In-Reply-To: <4E4FEA2E.7050209@FreeBSD.org> X-Face: *nPdTl_}RuAI6^PVpA02T?$%Xa^>@hE0uyUIoiha$pC:9TVgl.Oq, NwSZ4V"|LR.+tj}g5 %V,x^qOs~mnU3]Gn; cQLv&.N>TrxmSFf+p6(30a/{)KUU!s}w\IhQBj}[g}bj0I3^glmC( :AuzV9:.hESm-x4h240C`9=w MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201108201918.43978.hselasky@c2i.net> Cc: freebsd-stable@freebsd.org Subject: Re: USB/coredump hangs in 8 and 9 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 20 Aug 2011 17:21:15 -0000 On Saturday 20 August 2011 19:09:02 Andriy Gapon wrote: > on 20/08/2011 19:54 Hans Petter Selasky said the following: > > On Saturday 20 August 2011 18:45:57 Andriy Gapon wrote: > >> SCHEDULER_STOPPED > > > > The USB code needs to check for the SCHEDULER_STOPPED and cold at the > > present moment. If this state can be set during bootup, and cleared at > > the same time like "cold", it would be very good. > > Sorry again - not sure if I follow. > SCHEDULER_STOPPED is supposed to be set on panic and never be reset. It's > like a mirror of 'cold' in a sense. OK. Then you should add a test "&& !SCHEDULER_STOPPED" where I pointed out: static void usbd_callback_wrapper(struct usb_xfer_queue *pq) { struct usb_xfer *xfer = pq->curr; struct usb_xfer_root *info = xfer->xroot; USB_BUS_LOCK_ASSERT(info->bus, MA_OWNED); if (!mtx_owned(info->xfer_mtx) && !SCHEDULER_STOPPED) { /* * Cases that end up here: * And also ensure that no mutex asserts can trigger further panics. --HPS