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

next in thread | previous in thread | raw e-mail | index | archive | help
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 ethernet card is clearly not 
: present if the card itself isn't present). It might be better for the bus 
: implementation though if you pass the bus rather than the original child 
: device, e.g.:
: 
: int
: +bus_generic_child_present(device_t bus, device_t child)
: +{
: +	return (BUS_CHILD_PRESENT(device_get_parent(bus), bus));
: +}
: 
: This would give the parent bus enough information to find the ivars etc. 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.

Warner

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?20020624.144627.115021679.imp>