If a driver's _fini() always returns non-zero, it can't be unloaded.  There are
drivers that do that now, although it's not "nice" insofar as a driver that
can't be unloaded requires a reboot to update.

But trying to think of a safe alternative (short of a redesign to avoid the
situation) is giving me a headache.  Perhaps if everything in either A or B
that was needed to satisfy the other's requirements was moved into a
new module that both A and B depended on, leaving A and B just skeletons
(except for their own _info(), _init(), and _fini() code, I guess), that might
do the job.

It does mean the two drivers (plus the new module) would have to be
all maintained to work closely together, but that would've been the
case anyway, I think.

But I'm just speculating here, no clue if that work; certainly never tried it,
although I'd suppose that that's pretty much what modules are for anyway
in a sense (a dependency unit for code that's called by more than one
driver, although more conventionally one might think of that as containing
one or more routines most of which were used by more than one driver,
while here, each routine would typically be used only by one driver or the
other).
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to