Date: Sun, 1 Feb 2009 19:37:31 +0100 From: Hans Petter Selasky <hselasky@c2i.net> To: "M. Warner Losh" <imp@bsdimp.com> Cc: freebsd-usb@freebsd.org, thompsa@freebsd.org Subject: Re: USB2 patches Message-ID: <200902011937.32679.hselasky@c2i.net> In-Reply-To: <20090201.112459.717301987.imp@bsdimp.com> References: <20090201030628.GE65558@elvis.mu.org> <20090201175021.GA32503@citylink.fud.org.nz> <20090201.112459.717301987.imp@bsdimp.com>
index | next in thread | previous in thread | raw e-mail
Hi Warner,
On Sunday 01 February 2009, M. Warner Losh wrote:
> In message: <20090201175021.GA32503@citylink.fud.org.nz>
>
> Andrew Thompson <thompsa@freebsd.org> 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
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200902011937.32679.hselasky>
