newbus flaw

Doug Rabson dfr at nlsystems.com
Thu May 13 05:34:40 PDT 2004


On Thu, 2004-05-13 at 11:46, Dag-Erling Smørgrav wrote:
> Doug Rabson <dfr at nlsystems.com> writes:
> > When the old module unloaded, its driver will have detached from the 
> > device which it created. There is no reference to an old driver_t. Its 
> > perfectly safe for the new driver to use the old device.
> 
> so why do you say I "shouldn't reset the old driver and desc"?

I didn't say that (that was John-Mark). When you create a device using
something like device_add_child(parent, "foo", unit), the new device is
just labelled as a 'fooN' - it has no reference to any 'foo' driver and
should have since there may be several. The 'foo'ness of the device is
used to match the device against a suitable driver at probe time.





More information about the freebsd-arch mailing list