[PATCH] Change the PCI bus driver to free resources leaked by drivers

John Baldwin <[email protected]> Mon, 24 Jun 2013 16:59:14 -0400
Newsgroups gmane.os.freebsd.devel.new-bus
Message-ID <[email protected]>
Currently our driver model trusts drivers to DTRT and properly release any 
resources they allocated during probe() and attach().  I've added a new
resource_list() helper method to release active resources on a resource
list and used this to write a pci_child_detached() which cleans up any
active resources when a device fails to probe or a driver finishes
detach.  It also fixes an issue where we did not power down devices when
the driver was detached (e.g. via kldunload).  I've tested the resource
bits by writing a dummy driver that intentionally attached to an unattached
device and leaked a memory BAR and verified that the bus warned about the
leak and cleaned it up.

http://www.FreeBSD.org/~jhb/patches/pci_clean_detach.patch

-- 
John Baldwin
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-new-bus
To unsubscribe, send any mail to "[email protected]"