From owner-freebsd-usb@FreeBSD.ORG Sun Feb 1 18:39:17 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 EE7B2106566C; Sun, 1 Feb 2009 18:39:17 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id AF0308FC18; Sun, 1 Feb 2009 18:39:17 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id n11Iaj3g093459; Sun, 1 Feb 2009 11:36:45 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 01 Feb 2009 11:37:14 -0700 (MST) Message-Id: <20090201.113714.-887896087.imp@bsdimp.com> To: hselasky@c2i.net From: "M. Warner Losh" In-Reply-To: <200902011937.32679.hselasky@c2i.net> References: <20090201175021.GA32503@citylink.fud.org.nz> <20090201.112459.717301987.imp@bsdimp.com> <200902011937.32679.hselasky@c2i.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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:39:18 -0000 In message: <200902011937.32679.hselasky@c2i.net> Hans Petter Selasky writes: : 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); Yes. We already do that. I was thinking of the geom/device race that we haven't closed rather than this race which we have. Warner