Date: Fri, 11 Mar 2011 15:34:07 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r219493 - stable/8/sys/kern Message-ID: <201103111534.p2BFY7DI084319@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Fri Mar 11 15:34:06 2011 New Revision: 219493 URL: http://svn.freebsd.org/changeset/base/219493 Log: MFC 208898: Call BUS_PROBE_NOMATCH() when device detached due to driver unload. This allows bus to power-down device when driver unloaded on-flight. Modified: stable/8/sys/kern/subr_bus.c Directory Properties: 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) Modified: stable/8/sys/kern/subr_bus.c ============================================================================== --- stable/8/sys/kern/subr_bus.c Fri Mar 11 15:14:40 2011 (r219492) +++ stable/8/sys/kern/subr_bus.c Fri Mar 11 15:34:06 2011 (r219493) @@ -1180,6 +1180,9 @@ devclass_delete_driver(devclass_t buscla if ((error = device_detach(dev)) != 0) return (error); device_set_driver(dev, NULL); + BUS_PROBE_NOMATCH(dev->parent, dev); + devnomatch(dev); + dev->flags |= DF_DONENOMATCH; } } } @@ -2674,6 +2677,7 @@ device_attach(device_t dev) } device_sysctl_update(dev); dev->state = DS_ATTACHED; + dev->flags &= ~DF_DONENOMATCH; devadded(dev); return (0); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201103111534.p2BFY7DI084319>