Date: Mon, 28 Oct 2002 01:11:05 +0000 From: Ian Dowse <iedowse@maths.tcd.ie> To: "M. Warner Losh" <imp@bsdimp.com> Cc: freebsd-mobile@FreeBSD.ORG Subject: Re: Patch to fix/shorten "wi" freezes Message-ID: <200210280111.aa16990@salmon.maths.tcd.ie> In-Reply-To: Your message of "Sun, 27 Oct 2002 17:06:46 MST." <20021027.170646.118304063.imp@bsdimp.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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'. >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 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? <200210280111.aa16990>