--- Begin Message ---
As the newbus gurus, I hope you can shed a light on the following:
I am trying to resurrect tw.c into current. While modifying it,
I came across a weird problem. If you load/unload a ppbus
driver (if at all possible), each additional load/unload
leads to an additional probe the next time you load that driver.
E.g, if you add a printf to the probe function in vpo.c, you see:
command: dmesg
beck# kldload ./vpo.ko vpo probe called
beck# kldunload ./vpo.ko
beck# kldload ./vpo.ko vpo probe called
vpo probe called
beck# kldunload ./vpo.ko
beck# kldload ./vpo.ko vpo probe called
vpo probe called
vpo probe called
etc.
Someone suggested that the identify function was responsible for
this:
static void
vpo_identify(driver_t *driver, device_t parent)
{
BUS_ADD_CHILD(parent, 0, "vpo", -1);
}
Nowhere is the child removed from the parent at detach (also there is
no BUS_REMOVE_CHILD method).
What is the correct way to fix the probe call incrementing problem?
-Guido
--- End Message ---