From owner-freebsd-arch Mon Jun 24 15:17:25 2002 Delivered-To: freebsd-arch@freebsd.org Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by hub.freebsd.org (Postfix) with ESMTP id 83B4837B400 for ; Mon, 24 Jun 2002 15:17:20 -0700 (PDT) Received: from mailgate.nlsystems.com ([62.49.251.130] helo=herring.nlsystems.com) by anchor-post-34.mail.demon.net with esmtp (Exim 3.35 #1) id 17Mc99-0007l6-0Y; Mon, 24 Jun 2002 23:17:19 +0100 Received: from herring.nlsystems.com (localhost [127.0.0.1]) by herring.nlsystems.com (8.12.4/8.12.4) with ESMTP id g5OMHIGL034339; Mon, 24 Jun 2002 23:17:18 +0100 (BST) (envelope-from dfr@herring.nlsystems.com) Received: (from dfr@localhost) by herring.nlsystems.com (8.12.4/8.12.4/Submit) id g5OMHIuo034338; Mon, 24 Jun 2002 23:17:18 +0100 (BST) Content-Type: text/plain; charset="iso-8859-1" From: Doug Rabson To: "M. Warner Losh" Subject: Re: It is time to admit that removable devices exist Date: Mon, 24 Jun 2002 23:17:18 +0100 User-Agent: KMail/1.4.1 Cc: arch@freebsd.org References: <20020623.171200.96231110.imp@village.org> <200206240958.48240.dfr@nlsystems.com> <20020624.144627.115021679.imp@village.org> In-Reply-To: <20020624.144627.115021679.imp@village.org> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Message-Id: <200206242317.18561.dfr@nlsystems.com> 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 Monday 24 June 2002 9:46 pm, M. Warner Losh wrote: > In message: <200206240958.48240.dfr@nlsystems.com> > > Doug Rabson writes: > : In your implementation of bus_generic_child_present, you pass the > : original device to the parent bus' child_present method. The idea of > : cascading the request is a good one (e.g. the phy of a cardbus ethern= et > : card is clearly not present if the card itself isn't present). It mig= ht > : be better for the bus implementation though if you pass the bus rathe= r > : than the original child device, e.g.: > : > : int > : +bus_generic_child_present(device_t bus, device_t child) > : +{ > : +=09return (BUS_CHILD_PRESENT(device_get_parent(bus), bus)); > : +} > : > : This would give the parent bus enough information to find the ivars e= tc. > : to make a decision about whether 'bus' is still present. > > Maybe. However, I do not know if all busses can tell if an immediate > child can be detached always. I'm thinking specifically about USB and > its device tree. But USB could be written such that it can cope with > this. My thinking was that it would be hard for a bus to tell if something whic= h=20 wasn't an immediate child was present, since it can't know anything about= the=20 structure of its children's children. --=20 Doug Rabson=09=09=09=09Mail: dfr@nlsystems.com =09=09=09=09=09Phone: +44 20 8348 6160 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message