Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 Oct 2002 19:02:40 -0700 (MST)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        iedowse@maths.tcd.ie
Cc:        freebsd-mobile@FreeBSD.ORG
Subject:   Re: Patch to fix/shorten "wi" freezes 
Message-ID:  <20021027.190240.59654773.imp@bsdimp.com>
In-Reply-To: <200210280111.aa16990@salmon.maths.tcd.ie>
References:  <20021027.170646.118304063.imp@bsdimp.com> <200210280111.aa16990@salmon.maths.tcd.ie>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <200210280111.aa16990@salmon.maths.tcd.ie>
            Ian Dowse <iedowse@maths.tcd.ie> writes:
: In message <20021027.170646.118304063.imp@bsdimp.com>, "M. Warner Losh" writes:
: >
: >For the removal, it would be better to use the bus_child_present() api
: >for the eject case.
: 
: Does the pccard system implement bus_child_present()? I just did a
: quick grep for *_child_present there without finding anything, but
: maybe I'm looking for the wrong thing. Is the idea to use something
: like
: 
: 	if (sc->wi_gone)
: 		return;
: 	<hardware operation>
: 	if (timeout) {
: 		if (!bus_child_present(sc->dev)) {
: 			sc->wi_gone = 1;
: 			return;
: 		}
: 		device_printf(sc->dev, "device timeout\n");
: 	}
: 
: so that further slow timeouts can be avoided if the device has
: really been removed? I presume it is too much overhead to just call
: bus_child_present() everywhere instead of testing `gone'.

Well, I think I have them in my tree, but haven't committed them to
the tree yet.

The reason that I'd not call it all the time is because once a device
is gone, it should stay gone until it is reattached.  At least that's
been my experience with debouncing the pccard stuff.  Also, once it is
gone, it is a lot cheaper to check a flag, than to go to hardware,
which may take several microseconds.

Warner

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




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