From 308ea08882dffb49181e66586f3cf68db4ed3867 Mon Sep 17 00:00:00 2001 From: Simon Schubert Date: Sat, 5 Jan 2008 13:30:33 +0000 Subject: [PATCH] Don't let DS_BUSY buses block attachment of other devices. DS_BUSY implies that the device has been in state DS_ATTACHED before, so we need include DS_BUSY buses in the search as well. Joint-work-with: matthias@ --- sys/kern/subr_bus.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c index e12bb6246b..83ead30cd1 100644 --- a/sys/kern/subr_bus.c +++ b/sys/kern/subr_bus.c @@ -24,7 +24,7 @@ * SUCH DAMAGE. * * $FreeBSD: src/sys/kern/subr_bus.c,v 1.54.2.9 2002/10/10 15:13:32 jhb Exp $ - * $DragonFly: src/sys/kern/subr_bus.c,v 1.40 2007/09/12 07:59:31 hasso Exp $ + * $DragonFly: src/sys/kern/subr_bus.c,v 1.41 2008/01/05 13:30:33 corecode Exp $ */ #include "opt_bus.h" @@ -212,7 +212,7 @@ devclass_add_driver(devclass_t dc, driver_t *driver) */ for (i = 0; i < dc->maxunit; i++) { if ((dev = dc->devices[i]) != NULL) { - if (dev->state == DS_ATTACHED) + if (dev->state >= DS_ATTACHED) BUS_DRIVER_ADDED(dev, driver); } } -- 2.11.4.GIT