Paul Durrant wrote:
Joachim Worringen wrote:
Which mechanism decides that m2 should be busy, although this actually
is not the case (at least, should not be)? The calls from m3 into m2
are not seen by the kernel, how could (and why should) it decide that
m2 is still busy?
Here's how we link m2:
static struct modldrv modldrv =
{
&mod_miscops,
MBOX_INFO, /* a string */
NULL
};
static struct modlinkage modlinkage =
{
MODREV_1, /* MODREV_1 indicated by manl */
(void *)&modldrv,
NULL /* termination of list of linkage structures */
};
Is this a misc module or a drv module? You're using modldrv but
specifying mod_miscops. Not sure what effect that has without looking at
the code but, if m2 is a driver (rather than a misc module) then there
will be a detach(9e) routine which will need to succeed to allow an unload.
You're right, this should say
static struct modlmisc modlmisc =
{
&mod_miscops, /* not a driver */
MBOX_INFO /* "Dolphin mbox <version>" */
};
static struct modlinkage modlinkage =
{
MODREV_1, /* MODREV_1 indicated by manual */
(void *)&modlmisc,
NULL /* termination of list of linkage structures */
};
which it now does. But I think there should be no difference, as the
differentiation between misc and driver module is within the "ops"
entry, right?
Also, it typically does unload, but just sometimes refuses to do so.
I'll check if the behaviour changes now.
thanks, Joachim
--
Joachim Worringen, Software Architect, Dolphin Interconnect Solutions
phone ++49/(0)228/324 08 17 - http://www.dolphinics.com
_______________________________________________
opensolaris-code mailing list
opensolaris-code@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code