From owner-cvs-src@FreeBSD.ORG Thu Apr 17 13:35:54 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7EEA137B404 for ; Thu, 17 Apr 2003 13:35:54 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id B496C43FD7 for ; Thu, 17 Apr 2003 13:35:52 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 48028 invoked by uid 1000); 17 Apr 2003 20:35:53 -0000 Date: Thu, 17 Apr 2003 13:35:53 -0700 (PDT) From: Nate Lawson To: Nate Lawson In-Reply-To: <20030417203218.279D237B47A@hub.freebsd.org> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: current@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 X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 17 Apr 2003 20:35:55 -0000 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