HomeFreeBSD

Revise attach/detach resource cleanup
rS113609Unpublished

Unpublished Commit ยท Learn More

No further details are available.

Description

Revise attach/detach resource cleanup

  • Unconditionally call *_stop() if device is in the tree. This is to prevent callouts from happening after the device is gone. Checks for bus_child_present() should be added in the future to keep from touching potentially non-existent hardware in *_detach(). Found by iedowse@.
  • Always check for and free miibus children, even if the device is not in the tree since some failure cases could have gotten here.
  • Call ether_ifdetach() in the irq setup failure case
  • ti(4), xl(4): move ifmedia_init() calls to the beginning of attach so that ifmedia_removeall() can be unconditionally called on detach. There is no way to detect whether ifmedia has been initialized without using a separate variable (as tl(4) does).
  • Add comments to indicate assumptions of code path

Details

Provenance
njlAuthored on
Parents
rS113608: Add a manual page for the ntp_gettime syscall.
Branches
Unknown
Tags
Unknown

Event Timeline