Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Dec 1999 20:03:25 +0000 (GMT)
From:      Doug Rabson <dfr@nlsystems.com>
To:        Warner Losh <imp@village.org>
Cc:        Christopher Masto <chris@netmonger.net>, new-bus@freebsd.org
Subject:   Re: PCCARD eject freeze (was Re: your mail) 
Message-ID:  <Pine.BSF.4.10.9912012001260.325-100000@salmon.nlsystems.com>
In-Reply-To: <199912011828.LAA03228@harmony.village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 1 Dec 1999, Warner Losh wrote:

> [[ Moved to new-bus since this starts to get into what to do on a
>    detach ]]
> 
> Problem summary for the new-bus readers:
> 	device_detach deletes the softc allocated for the device.
> Drivers cache copies of softc in their ISRs and other places where
> they sleep and count on the cached copy of softc to still be around
> when they are woken up.  If a pccard is ejected between these points,
> these cached copies disappear because the ejection code deletes the
> device from the device tree (an as a side effect calls detach, which
> frees the softc for the device).
> 
> 	Suspend has a similar problem because it can come in while a
> device is sleeping.

The device_detach routine *must* teardown all interrupt handlers and
release all resources. If this rule is followed, then the handler
shouldn't be called after detach, so there is no problem, right?

--
Doug Rabson				Mail:  dfr@nlsystems.com
Nonlinear Systems Ltd.			Phone: +44 181 442 9037




To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-new-bus" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.10.9912012001260.325-100000>