From owner-freebsd-current Sat Feb 15 6:28: 5 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0FA3837B401; Sat, 15 Feb 2003 06:28:04 -0800 (PST) Received: from sasami.jurai.net (sasami.jurai.net [66.92.160.223]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4142443F85; Sat, 15 Feb 2003 06:28:03 -0800 (PST) (envelope-from winter@jurai.net) Received: from sasami.jurai.net (sasami.jurai.net [66.92.160.223]) by sasami.jurai.net (8.12.6/8.12.5) with ESMTP id h1FES1vA034912; Sat, 15 Feb 2003 09:28:01 -0500 (EST) (envelope-from winter@jurai.net) Date: Sat, 15 Feb 2003 09:28:01 -0500 (EST) From: "Matthew N. Dodd" To: Nate Lawson Cc: current@FreeBSD.ORG, wpaul@FreeBSD.ORG Subject: Re: sys/pci/if* fixes In-Reply-To: Message-ID: <20030215092452.E73971@sasami.jurai.net> References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 14 Feb 2003, Nate Lawson wrote: > Also, except for xl, all drivers have a common cleanup on error in > attach that backs out allocated resources with no assumptions about the > order they were allocated in. Please see if_pcn.c for the correct approach to freeing resources; its not necessary to wrap evrything in 'if (sc && error != 0) {}'. If execution reaches the 'fail' label then you assume that is what happened. I also think you should just drop and reaquire locks around the bus_setup_intr() rather than moving code around. -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | For Great Justice! | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message