In message: <[EMAIL PROTECTED]> "Matthew N. Dodd" <[EMAIL PROTECTED]> 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 [EMAIL PROTECTED] with "unsubscribe freebsd-current" in the body of the message