svn commit: r298710 - head/sys/dev/pci
John Baldwin
jhb at freebsd.org
Wed Apr 27 16:37:06 UTC 2016
On Wednesday, April 27, 2016 04:34:29 PM John Baldwin wrote:
> Author: jhb
> Date: Wed Apr 27 16:34:29 2016
> New Revision: 298710
> URL: https://svnweb.freebsd.org/changeset/base/298710
>
> Log:
> Fix PCI bus detach to delete child devices.
>
> Differential Revision: https://reviews.freebsd.org/D6020
Arguably, bus_generic_detach() should be calling device_delete_children()
as most (if not all) buses should delete child devices when detaching,
but that's a larger problem to solve.
If I had my druthers I'd probably rename bus_generic_detach() to
device_detach_children() and change bus_generic_detach() to call
device_detach_children() followed by device_delete_children().
Perhaps in 12 we can try to drain that swamp. bus_generic_attach()
has similar issues in that a generic bus attach routine should really
do what 'bus_generic_probe()' and 'bus_generic_attach()' should do.
There is no "generic" probe routine for a bus since a probe routine
must set a device description which is unique to the driver.
--
John Baldwin
More information about the svn-src-head
mailing list