From owner-freebsd-arch Mon Jun 24 13:36:59 2002 Delivered-To: freebsd-arch@freebsd.org Received: from sasami.jurai.net (sasami.jurai.net [66.92.160.223]) by hub.freebsd.org (Postfix) with ESMTP id 8F34B37B400 for ; Mon, 24 Jun 2002 13:36:53 -0700 (PDT) Received: from sasami.jurai.net (sasami.jurai.net [66.92.160.223]) by sasami.jurai.net (8.12.2/8.12.2) with ESMTP id g5OKap2A095666; Mon, 24 Jun 2002 16:36:51 -0400 (EDT) (envelope-from winter@jurai.net) Date: Mon, 24 Jun 2002 16:36:51 -0400 (EDT) From: "Matthew N. Dodd" To: "M. Warner Losh" Cc: arch@FreeBSD.ORG Subject: Re: It is time to admit that removable devices exist In-Reply-To: <20020623.171200.96231110.imp@village.org> Message-ID: <20020624163116.J95270-100000@sasami.jurai.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Sun, 23 Jun 2002, M. Warner Losh wrote: > Please find enclosed the beginnings of a patch to make removable devices > better represented in the system. Right now all it adds is a mechanism > by which client drivers can ask if the device is still really there or > not. If a device driver is ever in a position to ask this question when a device is not actually present then we've got larger issues. I don't think this is the correct solution; adding function calls to all the interrupt handlers is broken, especially since PCMCIA doesn't really support hot removal of devices anyway. No other OS supports this correctly either. I suggest that you implement a PCMCIA/CARDBUS specific BUS_SETUP_INTR method that performs whatever check is needed before calling the driver interrupt handler. We should also implement 'ifconfig detach/unplumb/destroy' as an interface for forcing network devices (the most common hot removed device) to be detached. This will allow users to completely detach the device before they remove it. -- | Matthew N. Dodd | '78 Datsun 280Z | '75 Volvo 164E | FreeBSD/NetBSD | | winter@jurai.net | 2 x '84 Volvo 245DL | ix86,sparc,pmax | | http://www.jurai.net/~winter | For Great Justice! | ISO8802.5 4ever | To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message