summaryrefslogtreecommitdiffstats
path: root/sys/opencrypto
diff options
context:
space:
mode:
authormarius <marius@FreeBSD.org>2010-11-14 13:09:32 +0000
committermarius <marius@FreeBSD.org>2010-11-14 13:09:32 +0000
commit47ccecf68d1b7864707f8a7dff2fb8c1a7597703 (patch)
tree64c03d857b2797e95a08fa77b215f9a62c2b14ad /sys/opencrypto
parenta25e937c7a964ae1c87b35e391d3123188d8fc1f (diff)
downloadFreeBSD-src-47ccecf68d1b7864707f8a7dff2fb8c1a7597703.zip
FreeBSD-src-47ccecf68d1b7864707f8a7dff2fb8c1a7597703.tar.gz
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
Diffstat (limited to 'sys/opencrypto')
-rw-r--r--sys/opencrypto/cryptosoft.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/opencrypto/cryptosoft.c b/sys/opencrypto/cryptosoft.c
index e05b015..d73f462 100644
--- a/sys/opencrypto/cryptosoft.c
+++ b/sys/opencrypto/cryptosoft.c
@@ -1060,7 +1060,7 @@ swcr_identify(driver_t *drv, device_t parent)
{
/* 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
OpenPOWER on IntegriCloud