From owner-freebsd-usb@FreeBSD.ORG Sun Feb 1 18:35:08 2009 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 CBDD21065676; Sun, 1 Feb 2009 18:35:08 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe16.swipnet.se [212.247.155.225]) by mx1.freebsd.org (Postfix) with ESMTP id 36BB28FC1F; Sun, 1 Feb 2009 18:35:07 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] X-Cloudmark-Analysis: v=1.0 c=1 a=7FnJfBjBj6YBYHsS3dAA:9 a=Ja3thZtoQAx_2BLkpXT17nHeXc0A:4 a=SV7veod9ZcQA:10 a=50e4U0PicR4A:10 Received: from [85.19.218.115] (account mc467741@c2i.net HELO [10.37.1.92]) by mailfe16.swip.net (CommuniGate Pro SMTP 5.2.6) with ESMTPA id 446142089; Sun, 01 Feb 2009 19:35:06 +0100 From: Hans Petter Selasky To: "M. Warner Losh" Date: Sun, 1 Feb 2009 19:37:31 +0100 User-Agent: KMail/1.9.7 References: <20090201030628.GE65558@elvis.mu.org> <20090201175021.GA32503@citylink.fud.org.nz> <20090201.112459.717301987.imp@bsdimp.com> In-Reply-To: <20090201.112459.717301987.imp@bsdimp.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200902011937.32679.hselasky@c2i.net> Cc: freebsd-usb@freebsd.org, thompsa@freebsd.org Subject: Re: USB2 patches 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: Sun, 01 Feb 2009 18:35:09 -0000 Hi Warner, On Sunday 01 February 2009, M. Warner Losh wrote: > In message: <20090201175021.GA32503@citylink.fud.org.nz> > > Andrew Thompson writes: > The only way that a 'deferred attach' makes sense is > if the ifnet and other external resources are setup as part of > that deferred attach. That way, you don't have the NULL pointer issue. That was what the initial code did. > > However, doing that introduces races with devd, which are a pita to > cope with... Even without deferring the setting up if ifnet, you have > races with devd if you defer things in attach that can be hard to cope > with in the code. No, not if the ifnet attach is deferred too. My conclusion is: Do not make match rules for "rumX/uralX/zydX", instead match for the IFNET event in devd.conf. devctl_notify("IFNET", ifp->if_xname, "ATTACH", NULL); --HPS