Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Apr 2003 13:35:53 -0700 (PDT)
From:      Nate Lawson <nate@root.org>
To:        Nate Lawson <njl@FreeBSD.org>
Cc:        cvs-all@FreeBSD.org
Subject:   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
Message-ID:  <Pine.BSF.4.21.0304171333280.48026-100000@root.org>
In-Reply-To: <20030417203218.279D237B47A@hub.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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@.
>   - 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0304171333280.48026-100000>