Date: Thu, 18 Mar 2004 09:02:30 +0100 From: Guido van Rooij <guido@gvr.org> To: new-bus@FreeBSD.org Subject: ppbus probe problem Message-ID: <20040318080230.GA87270@gvr.gvr.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040318080230.GA87270>