Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 13 Sep 2009 18:29:59 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        scottl@samsco.org
Cc:        attilio@FreeBSD.org, svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org
Subject:   Re: svn commit: r197165 - in head/sys: kern sys
Message-ID:  <20090913.182959.1038847030.imp@bsdimp.com>
In-Reply-To: <C34D0915-F970-46AC-B343-0F5946F07538@samsco.org>
References:  <200909131508.n8DF8JwI024189@svn.freebsd.org> <C34D0915-F970-46AC-B343-0F5946F07538@samsco.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <C34D0915-F970-46AC-B343-0F5946F07538@samsco.org>
            Scott Long <scottl@samsco.org> writes:
: Are we just just giving up on this for now?  Also, I would have liked  
: to have known that this was coming.

There's a thread in arch@ that discusses the plans, more or less...

Warner


: Scott
: 
: On Sep 13, 2009, at 9:08 AM, Attilio Rao wrote:
: 
: > Author: attilio
: > Date: Sun Sep 13 15:08:19 2009
: > New Revision: 197165
: > URL: http://svn.freebsd.org/changeset/base/197165
: >
: > Log:
: >  Revert r196779 in order to implement a different scheme for newbus  
: > locking
: >  methodology.
: >
: >  Requested by:	imp
: >
: > Modified:
: >  head/sys/kern/subr_bus.c
: >  head/sys/sys/bus.h
: >
: > Modified: head/sys/kern/subr_bus.c
: > = 
: > = 
: > = 
: > = 
: > = 
: > = 
: > = 
: > = 
: > ======================================================================
: > --- head/sys/kern/subr_bus.c	Sun Sep 13 14:47:31 2009	(r197164)
: > +++ head/sys/kern/subr_bus.c	Sun Sep 13 15:08:19 2009	(r197165)
: > @@ -2625,16 +2625,10 @@ device_attach(device_t dev)
: > {
: > 	int error;
: >
: > -	if (dev->state >= DS_ATTACHING)
: > -		return (0);
: > 	device_sysctl_init(dev);
: > 	if (!device_is_quiet(dev))
: > 		device_print_child(dev->parent, dev);
: > -	dev->state = DS_ATTACHING;
: > 	if ((error = DEVICE_ATTACH(dev)) != 0) {
: > -		KASSERT(dev->state == DS_ATTACHING,
: > -		    ("%s: %p device state must not been changing", __func__,
: > -		    dev));
: > 		printf("device_attach: %s%d attach returned %d\n",
: > 		    dev->driver->name, dev->unit, error);
: > 		/* Unset the class; set in device_probe_child */
: > @@ -2645,8 +2639,6 @@ device_attach(device_t dev)
: > 		dev->state = DS_NOTPRESENT;
: > 		return (error);
: > 	}
: > -	KASSERT(dev->state == DS_ATTACHING,
: > -	    ("%s: %p device state must not been changing", __func__, dev));
: > 	device_sysctl_update(dev);
: > 	dev->state = DS_ATTACHED;
: > 	devadded(dev);
: > @@ -2682,16 +2674,8 @@ device_detach(device_t dev)
: > 	if (dev->state != DS_ATTACHED)
: > 		return (0);
: >
: > -	dev->state = DS_DETACHING;
: > -	if ((error = DEVICE_DETACH(dev)) != 0) {
: > -		KASSERT(dev->state == DS_DETACHING,
: > -		    ("%s: %p device state must not been changing", __func__,
: > -		    dev));
: > -		dev->state = DS_ATTACHED;
: > +	if ((error = DEVICE_DETACH(dev)) != 0)
: > 		return (error);
: > -	}
: > -	KASSERT(dev->state == DS_DETACHING,
: > -	    ("%s: %p device state must not been changing", __func__, dev));
: > 	devremoved(dev);
: > 	if (!device_is_quiet(dev))
: > 		device_printf(dev, "detached\n");
: > @@ -2746,7 +2730,7 @@ device_quiesce(device_t dev)
: > int
: > device_shutdown(device_t dev)
: > {
: > -	if (dev->state < DS_ATTACHED || dev->state == DS_DETACHING)
: > +	if (dev->state < DS_ATTACHED)
: > 		return (0);
: > 	return (DEVICE_SHUTDOWN(dev));
: > }
: >
: > Modified: head/sys/sys/bus.h
: > = 
: > = 
: > = 
: > = 
: > = 
: > = 
: > = 
: > = 
: > ======================================================================
: > --- head/sys/sys/bus.h	Sun Sep 13 14:47:31 2009	(r197164)
: > +++ head/sys/sys/bus.h	Sun Sep 13 15:08:19 2009	(r197165)
: > @@ -52,11 +52,8 @@ struct u_businfo {
: > typedef enum device_state {
: > 	DS_NOTPRESENT,			/**< @brief not probed or probe failed */
: > 	DS_ALIVE,			/**< @brief probe succeeded */
: > -	DS_ATTACHING,			/**< @brief attaching is in progress */
: > 	DS_ATTACHED,			/**< @brief attach method called */
: > -	DS_BUSY,			/**< @brief device is open */
: > -	DS_DETACHING			/**< @brief detaching is in progress */
: > -
: > +	DS_BUSY				/**< @brief device is open */
: > } device_state_t;
: >
: > /**
: 
1



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