cvs commit: src/sys/pci if_dc.c if_pcn.c if_rl.c if_sf.cif_sis.c if_sk.c if_ste.c if_ti.c if_tl.c if_vr.c if_wb.c if_xl.c

Nate Lawson nate at root.org
Thu Apr 17 13:35:55 PDT 2003


On Thu, 17 Apr 2003, Nate Lawson wrote:
>   Modified files:
>     sys/pci              if_dc.c if_pcn.c if_rl.c if_sf.c if_sis.c 
>                          if_sk.c if_ste.c if_ti.c if_tl.c if_vr.c 
>                          if_wb.c if_xl.c 
>   Log:
>   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 at .
>   - 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

As always, if you have one of the above ethernet cards, please test this
commit by loading/unloading your driver as a module.  This should fix the
problem ru@ and iedowse@ saw as well as cleanup some potential resource
leaks in attach failure cases.

-Nate



More information about the cvs-src mailing list