Subject: Re: if_delete * if_alloc
To: Matt Thomas <>
From: Chris G. Demetriou <>
List: tech-kern
Date: 07/09/1997 12:46:00
> But the driver should be able to veto/delay of freeing of the
> softc because there may be outstanding references to it
> that the driver load/unload doesn't know about.

In the current system, that may be the best that you can do if you
want to cover all possibilities.  However, I don't think it's correct
by any means.  I think the correct solution is to allow the driver to
sleep while detaching, so that e.g. other calls into the driver can be
unwound safely.

For the case where a driver's actually detaching because of a user
request, it should be running in the appropriate process context and
be able to sleep.

Unfortunately, for the case where a driver's detaching because of an
interrupt-driven event (e.g. PCMCIA card being yanked while the device
is 'hot'), there's no great solution right now.