From owner-freebsd-mobile Sun Oct 27 17:11: 9 2002 Delivered-To: freebsd-mobile@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CC3B937B401 for ; Sun, 27 Oct 2002 17:11:07 -0800 (PST) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 988C843E6E for ; Sun, 27 Oct 2002 17:11:06 -0800 (PST) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 28 Oct 2002 01:11:05 +0000 (GMT) To: "M. Warner Losh" Cc: freebsd-mobile@FreeBSD.ORG Subject: Re: Patch to fix/shorten "wi" freezes In-Reply-To: Your message of "Sun, 27 Oct 2002 17:06:46 MST." <20021027.170646.118304063.imp@bsdimp.com> Date: Mon, 28 Oct 2002 01:11:05 +0000 From: Ian Dowse Message-ID: <200210280111.aa16990@salmon.maths.tcd.ie> Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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; 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