James Carlson wrote:
Garrett D'Amore writes:
For drivers (you can't do this for misc modules) you can use a special
property: ddi-no-autodetach. This property, if non-zero, indicates that
modunload -i 0 will not try to detach instances of your device in
response to modunload -i 0. I know of particular devices where this is
important -- the audio drivers do it so that they won't lose settings
just because nobody is using the device at the precise time that
modunload -i 0 is called.
Ick. Sure sounds like we need a better answer for that one.
Its actually not that bad. The audio framework does this on behalf of
the drivers:
(void) ddi_prop_update_int(DDI_DEV_T_NONE, d->d_dip,
DDI_NO_AUTODETACH, 1);
(Note that "DDI_NO_AUTODETACH" is predefined macro in <sys/sunddi.h>.)
-- Garrett
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code