From owner-cvs-src@FreeBSD.ORG Thu Apr 10 11:19:01 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 1FBE437B401 for ; Thu, 10 Apr 2003 11:19:01 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 0D22743FCB for ; Thu, 10 Apr 2003 11:19:00 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 31997 invoked by uid 1000); 10 Apr 2003 18:19:00 -0000 Date: Thu, 10 Apr 2003 11:19:00 -0700 (PDT) From: Nate Lawson To: Warner Losh In-Reply-To: <20030410051257.D296537B408@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: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/dev/an if_an.c if_an_isa.c if_an_pccard.c if_an_pci.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, 10 Apr 2003 18:19:01 -0000 On Wed, 9 Apr 2003, Warner Losh wrote: > Modified files: > sys/dev/an if_an.c if_an_isa.c if_an_pccard.c > if_an_pci.c > Log: > Don't lock in the attach routine. It isn't required. Register the > interrupt handler last. This gets rid of the sleep while locked > messages. > > Reviewed by: ambrisko This is nice. > @@ -817,9 +806,11 @@ > */ > ether_ifattach(ifp, sc->arpcom.ac_enaddr); > callout_handle_init(&sc->an_stat_ch); > - AN_UNLOCK(sc); > > return(0); > +fail:; > + mtx_destroy(&sc->an_mtx); > + return(error); > } > > static void Extra ; after "fail:" > @@ -176,18 +176,26 @@ > an_alloc_port(dev, sc->port_rid, AN_IOSIZ); > an_alloc_irq(dev, sc->irq_rid, 0); You should probably check the return values of these. -Nate