Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jun 2002 23:17:18 +0100
From:      Doug Rabson <dfr@nlsystems.com>
To:        "M. Warner Losh" <imp@village.org>
Cc:        arch@freebsd.org
Subject:   Re: It is time to admit that removable devices exist
Message-ID:  <200206242317.18561.dfr@nlsystems.com>
In-Reply-To: <20020624.144627.115021679.imp@village.org>
References:  <20020623.171200.96231110.imp@village.org> <200206240958.48240.dfr@nlsystems.com> <20020624.144627.115021679.imp@village.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 24 June 2002 9:46 pm, M. Warner Losh wrote:
> In message: <200206240958.48240.dfr@nlsystems.com>
>
>             Doug Rabson <dfr@nlsystems.com> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200206242317.18561.dfr>