Re: Patch to fix/shorten "wi" freezes

Ian Dowse <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <[email protected]>
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'.

>For the hardware becomes confused case, setting
>gone means that nothing further will happen with the card.  However,
>the other parts of this patch seem relatively reasonable to me.

Yes, this is a problem if some devices report errors and then come
back to life. The problems I have seen don't recover, but I guess
that will not always be the case. In the patch the `gone' flag is
set when status is 0xffff after a timeout and when the "busy bit
won't clear" error occurs. Hopefully these are both usually cases
where the hardware does not recover itself.

Ian



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.