Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 14 Nov 2010 13:09:33 +0000 (UTC)
From:      Marius Strobl <marius@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r215295 - head/sys/opencrypto
Message-ID:  <201011141309.oAED9Xcv082719@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: marius
Date: Sun Nov 14 13:09:32 2010
New Revision: 215295
URL: http://svn.freebsd.org/changeset/base/215295

Log:
  Let cryptosoft(4) add its pseudo-device with a specific unit number and its
  probe method return BUS_PROBE_NOWILDCARD so it doesn't get attached to real
  devices hanging off of nexus(4) with no specific devclass set. Actually, the
  more desirable fix for this would be to get rid of the newbus interface of
  cryptosoft(4) altogether but apparently crypto(9) was written with support
  for cryptographic hardware in mind so that approach would require some KPI
  breaking changes which don't seem worth it.
  
  MFC after:	1 week

Modified:
  head/sys/opencrypto/cryptosoft.c

Modified: head/sys/opencrypto/cryptosoft.c
==============================================================================
--- head/sys/opencrypto/cryptosoft.c	Sun Nov 14 13:06:34 2010	(r215294)
+++ head/sys/opencrypto/cryptosoft.c	Sun Nov 14 13:09:32 2010	(r215295)
@@ -1060,7 +1060,7 @@ swcr_identify(driver_t *drv, device_t pa
 {
 	/* NB: order 10 is so we get attached after h/w devices */
 	if (device_find_child(parent, "cryptosoft", -1) == NULL &&
-	    BUS_ADD_CHILD(parent, 10, "cryptosoft", -1) == 0)
+	    BUS_ADD_CHILD(parent, 10, "cryptosoft", 0) == 0)
 		panic("cryptosoft: could not attach");
 }
 
@@ -1068,7 +1068,7 @@ static int
 swcr_probe(device_t dev)
 {
 	device_set_desc(dev, "software crypto");
-	return (0);
+	return (BUS_PROBE_NOWILDCARD);
 }
 
 static int



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