From 14b1df077eb72ad4544acd6db8b8aba71a98f8e6 Mon Sep 17 00:00:00 2001 From: Greg Lehey Date: Tue, 3 Jun 2003 04:51:31 +0000 Subject: [PATCH] Don't deregister the kld on resetconfig, only when we're really ready to unload. This would cause a panic on the second resetconfig. Start Vinum at boot time at SI_SUB_RAID, not SI_SUB_VINUM. SI_SUB_VINUM was there first, but there's no real distinction, and SI_SUB_RAID is a more neutral name. Submitted by: hmp --- sys/dev/vinum/vinum.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c index 8db00aa5252c..36dfa982ed5d 100644 --- a/sys/dev/vinum/vinum.c +++ b/sys/dev/vinum/vinum.c @@ -35,7 +35,7 @@ * otherwise) arising in any way out of the use of this software, even if * advised of the possibility of such damage. * - * $Id: vinum.c,v 1.44 2003/05/23 00:50:55 grog Exp $ + * $Id: vinum.c,v 1.44 2003/05/23 00:50:55 grog Exp grog $ * $FreeBSD$ */ @@ -262,7 +262,6 @@ free_vinum(int cleardrive) } bzero(&vinum_conf, sizeof(vinum_conf)); vinum_conf.version = VINUMVERSION; /* reinstate version number */ - EVENTHANDLER_DEREGISTER(dev_clone, dev_clone_tag); } STATIC int @@ -315,6 +314,7 @@ vinum_modevent(module_t mod, modeventtype_t type, void *unused) for (i = 0; i < PLEXMUTEXES; i++) mtx_destroy(&plexmutex[i]); log(LOG_INFO, "vinum: unloaded\n"); /* tell the world */ + EVENTHANDLER_DEREGISTER(dev_clone, dev_clone_tag); return 0; default: break; @@ -328,7 +328,7 @@ static moduledata_t vinum_mod = (modeventhand_t) vinum_modevent, 0 }; -DECLARE_MODULE(vinum, vinum_mod, SI_SUB_VINUM, SI_ORDER_MIDDLE); +DECLARE_MODULE(vinum, vinum_mod, SI_SUB_RAID, SI_ORDER_MIDDLE); /* ARGSUSED */ /* Open a vinum object */