Date: Sun, 16 Feb 2003 22:51:54 -0700 (MST) From: "M. Warner Losh" <imp@bsdimp.com> To: winter@jurai.net Cc: nate@root.org, current@FreeBSD.ORG, wpaul@FreeBSD.ORG Subject: Re: sys/pci/if* fixes Message-ID: <20030216.225154.128867002.imp@bsdimp.com> In-Reply-To: <20030215092452.E73971@sasami.jurai.net> References: <Pine.BSF.4.21.0302141503110.39134-100000@root.org> <20030215092452.E73971@sasami.jurai.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20030215092452.E73971@sasami.jurai.net> "Matthew N. Dodd" <winter@jurai.net> writes: : 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. I don't think that's reasonable. The reason that the lock is there is so that the ISR can't interrupt the attach routine if interrupts are enabled. Also, you can't hold the driver lock when you call the network if attach routines because then you get lock order reversals in the watchdog routine.... Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030216.225154.128867002.imp>