Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Dec 2006 00:55:57 GMT
From:      Sam Leffler <sam@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 111091 for review
Message-ID:  <200612050055.kB50tvTe083497@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=111091

Change 111091 by sam@sam_ebb on 2006/12/05 00:55:52

	check if cryptosoft device exists before adding it; this
	works around the device not being detached on module unload

Affected files ...

.. //depot/projects/crypto/sys/opencrypto/cryptosoft.c#3 edit

Differences ...

==== //depot/projects/crypto/sys/opencrypto/cryptosoft.c#3 (text+ko) ====

@@ -975,7 +975,8 @@
 swcr_identify(device_t *dev, device_t parent)
 {
 	/* NB: order 10 is so we get attached after h/w devices */
-	if (BUS_ADD_CHILD(parent, 10, "cryptosoft", -1) == 0)
+	if (device_find_child(parent, "cryptosoft", -1) == NULL &&
+	    BUS_ADD_CHILD(parent, 10, "cryptosoft", -1) == 0)
 		panic("cryptosoft: could not attach");
 }
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612050055.kB50tvTe083497>