Module Name: src Committed By: dyoung Date: Thu Jul 16 01:30:10 UTC 2009
Modified Files: src/sys/dev/ic: mfi.c Log Message: Try to detach ancestors (sd0 at scsibus0, scsibus0 at mfi0), first, to avoid dangling references to envsys(4) sensors and such if detaching the ancestors should fail. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/dev/ic/mfi.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ic/mfi.c diff -u src/sys/dev/ic/mfi.c:1.24 src/sys/dev/ic/mfi.c:1.25 --- src/sys/dev/ic/mfi.c:1.24 Thu Jul 16 01:01:47 2009 +++ src/sys/dev/ic/mfi.c Thu Jul 16 01:30:10 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mfi.c,v 1.24 2009/07/16 01:01:47 dyoung Exp $ */ +/* $NetBSD: mfi.c,v 1.25 2009/07/16 01:30:10 dyoung Exp $ */ /* $OpenBSD: mfi.c,v 1.66 2006/11/28 23:59:45 dlg Exp $ */ /* * Copyright (c) 2006 Marco Peereboom <ma...@peereboom.us> @@ -17,7 +17,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.24 2009/07/16 01:01:47 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mfi.c,v 1.25 2009/07/16 01:30:10 dyoung Exp $"); #include "bio.h" @@ -635,6 +635,9 @@ DNPRINTF(MFI_D_MISC, "%s: mfi_detach\n", DEVNAME(sc)); + if ((error = config_detach_children(&sc->sc_dev, flags)) != 0) + return error; + #if NBIO > 0 mfi_destroy_sensors(sc); bio_unregister(&sc->sc_dev); @@ -642,9 +645,6 @@ mfi_intr_disable(sc); - if ((error = config_detach_children(&sc->sc_dev, flags)) != 0) - return error; - /* TBD: shutdown firmware */ if ((error = mfi_destroy_ccb(sc)) != 0)