USB2 patches

M. Warner Losh imp at bsdimp.com
Sun Feb 1 10:39:18 PST 2009


In message: <200902011937.32679.hselasky at c2i.net>
            Hans Petter Selasky <hselasky at c2i.net> writes:
: Hi Warner,
: 
: On Sunday 01 February 2009, M. Warner Losh wrote:
: > In message: <20090201175021.GA32503 at citylink.fud.org.nz>
: >
: >             Andrew Thompson <thompsa at 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);

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


More information about the freebsd-usb mailing list