Page MenuHomeFreeBSD

Fix PCI bus detach to delete child devices.
ClosedPublic

Authored by jhb on Apr 20 2016, 2:40 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Jun 22, 1:31 PM
Unknown Object (File)
Wed, Jun 18, 2:40 AM
Unknown Object (File)
Tue, Jun 17, 6:22 PM
Unknown Object (File)
Mon, Jun 16, 8:39 PM
Unknown Object (File)
Mon, Jun 16, 3:10 AM
Unknown Object (File)
Thu, Jun 12, 4:50 AM
Unknown Object (File)
May 14 2025, 9:22 AM
Unknown Object (File)
Apr 22 2025, 3:26 PM
Subscribers

Details

Summary

Fix PCI bus detach to delete child devices.

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().

Test Plan
  • the hotplug patches detach (and delete) the PCI bus on card insertion and exercised this change

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3342
Build 3377: arc lint + arc unit

Event Timeline

jhb retitled this revision from to Fix PCI bus detach to delete child devices..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
jhb added a reviewer: imp.
This revision was automatically updated to reflect the committed changes.