[driver-discuss] Is it possible for two drivers to depend on each other?
Vincent R Wang
Vincent.Wang at Sun.COM
Thu Feb 8 19:16:15 PST 2007
LiuFeng wrote:
>Good day, everyone!
>
>I have a question here.
>I have two drivers, say A and B, that cooperate to provide a specific funcationality. A can call a routine provided by B and passes in a callback as a parameter so that B can use that to call into A. From this point of view, they behavior like module. Such calls could be issued even before the drivers create minor nodes. Yet I can only create one-way dependency, say A depends on B.
>The issues is: it's possible that A could be unloaded, which is very possible with debug kernel, when B call into A. And the system will panic.
>
>Is there a way out ?
>
>
Try returning EBUSY in _fini() without calling mod_remove(9F).
Another trick is when A is a driver, in A's driver.conf, add
ddi-forceattach=1
Vincent.
More information about the driver-discuss
mailing list