Date: Mon, 3 Jul 2000 15:02:03 +0100 (BST) From: Nick Hibma <n_hibma@calcaphon.com> To: Poul-Henning Kamp <phk@critter.freebsd.dk> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/sys bus.h bus_private.h src/sys/kern subr_bus.c Message-ID: <Pine.BSF.4.20.0007031446590.20829-100000@localhost> In-Reply-To: <6139.962631876@critter.freebsd.dk>
next in thread | previous in thread | raw e-mail | index | archive | help
> In fact: I object to newbus allocating the softc for exactly the > reason this one is needed: There may be a 1:N or N:1 correspondence > between softc's and newbus devices. In this case I have two > newbus devices for one softc. (Well, actually I have two newbus > devices for five softc's, but lets not get into that) As you have noticed yourself the problem is not having the same softc but the fact that you can't claim all the appropriate newbus devices in one go. Setting the softc of the individual devices to point at the central struct basically links several unrelated devices together in an obscure way. You will have to start doing reference counting on the central struct. Your 1:N or N:1 relationship to _a_ struct (which you conveniently call the softc) can be expressed by a reference in the original softc to the central struct, the super-softc struct if you will. It is logically much clearer to have a set of drivers claiming the individual devices and a second stage that contains the actual code including the super-softc, be that a separate newbus device or something else. Bottom line: the conceptual design of your driver doesn't fit newbus. Nick -- n_hibma@webweaving.org n_hibma@freebsd.org USB project http://www.etla.net/~n_hibma/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.20.0007031446590.20829-100000>