svn commit: r197494 - in stable/8/sys: . amd64/include/xen
cddl/contrib/opensolaris contrib/dev/acpica contrib/pf
dev/xen/xenpci kern
Alexander Motin
mav at FreeBSD.org
Fri Sep 25 18:04:56 UTC 2009
Author: mav
Date: Fri Sep 25 18:04:55 2009
New Revision: 197494
URL: http://svn.freebsd.org/changeset/base/197494
Log:
MFC rev. 197462:
Do not call BUS_DRIVER_ADDED() for detached buses (attach failed) on
driver load. This fixes crash on atapicam module load on systems, where
some ata channels (usually ata1) was probed, but failed to attach.
Reviewed by: jhb, imp
Tested by: many
Approved by: re (kib)
Modified:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
stable/8/sys/kern/subr_bus.c
Modified: stable/8/sys/kern/subr_bus.c
==============================================================================
--- stable/8/sys/kern/subr_bus.c Fri Sep 25 17:56:32 2009 (r197493)
+++ stable/8/sys/kern/subr_bus.c Fri Sep 25 18:04:55 2009 (r197494)
@@ -1017,7 +1017,7 @@ devclass_driver_added(devclass_t dc, dri
* Call BUS_DRIVER_ADDED for any existing busses in this class.
*/
for (i = 0; i < dc->maxunit; i++)
- if (dc->devices[i])
+ if (dc->devices[i] && device_is_attached(dc->devices[i]))
BUS_DRIVER_ADDED(dc->devices[i], driver);
/*
More information about the svn-src-stable-8
mailing list