How to get a device_t

Bernd Walter ticso at cicely12.cicely.de
Wed Aug 6 04:00:29 PDT 2003


On Wed, Aug 06, 2003 at 12:45:43PM +0200, Poul-Henning Kamp wrote:
> In message <20030806104001.GD32228 at cicely12.cicely.de>, Bernd Walter writes:
> >On Wed, Aug 06, 2003 at 12:18:28PM +0200, Poul-Henning Kamp wrote:
> >> In message <20030806101148.GC32228 at cicely12.cicely.de>, Bernd Walter writes:
> >> >>From the logicaly standpoint the extensions had to be attached to
> >> >nexus, but nowhere is the current code path there is a handle for
> >> >nexus or any other device_t.
> >> 
> >> In fact what you may want to do is hang the entire MMCR off the nexus
> >> as a bus, and hang the various drivers off that bus.
> >
> >What needs to be in *_probe() to conditionalize on elan existence?
> 
> Well, my idea was to hang the mmcr bus on nexus when we find out it
> is an elan.

Back to the original question:
How do I get the device_t from nexus?
Is there a get_nexus() function somewhere?

> It may be that you are not allowed to attach a bus to the nexus when
> we find out it is an elan in the host/pci bridge probe, but then I guess
> you could just hang it off that instead.

There is also no other device_t in the code path available.
The last function knowing a device_t is nexus_pcib_identify.
We then have to pass this as an argument to nexus_pcib_is_host_bridge().

> Pressumably some newbus magic will then probe that bus.  If its not
> an elan, there is no mmcr bus and nothing will get probed.

Yes - that part is clear.

-- 
B.Walter                   BWCT                http://www.bwct.de
ticso at bwct.de                                  info at bwct.de



More information about the freebsd-hackers mailing list