Re: Patch to fix/shorten "wi" freezes

"M. Warner Losh" <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
In message: <[email protected]>
            Ian Dowse <[email protected]> writes:
: In message <[email protected]>, "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 [email protected]
with "unsubscribe freebsd-mobile" in the body of the message
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.