From owner-freebsd-mobile Sun Oct 27 18: 3:36 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 557DA37B401 for ; Sun, 27 Oct 2002 18:03:35 -0800 (PST) Received: from harmony.village.org (rover.bsdimp.com [204.144.255.66]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6C89643E4A for ; Sun, 27 Oct 2002 18:03:34 -0800 (PST) (envelope-from imp@bsdimp.com) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.12.3/8.12.3) with ESMTP id g9S23Tpk025626; Sun, 27 Oct 2002 19:03:29 -0700 (MST) (envelope-from imp@bsdimp.com) Date: Sun, 27 Oct 2002 19:02:40 -0700 (MST) Message-Id: <20021027.190240.59654773.imp@bsdimp.com> To: iedowse@maths.tcd.ie Cc: freebsd-mobile@FreeBSD.ORG Subject: Re: Patch to fix/shorten "wi" freezes From: "M. Warner Losh" In-Reply-To: <200210280111.aa16990@salmon.maths.tcd.ie> References: <20021027.170646.118304063.imp@bsdimp.com> <200210280111.aa16990@salmon.maths.tcd.ie> X-Mailer: Mew version 2.1 on Emacs 21.2 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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: <200210280111.aa16990@salmon.maths.tcd.ie> Ian Dowse 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; : : 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