Re: 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

From: Nate Lawson <nate_at_root.org>
Date: Thu, 17 Apr 2003 13:35:53 -0700 (PDT)
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_at_ and iedowse_at_ saw as well as cleanup some potential resource
leaks in attach failure cases.

-Nate
Received on Thu Apr 17 2003 - 11:35:54 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:03 UTC