Subject: Re: bus_space questions ...
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Matt Thomas <matt@3am-software.com>
List: tech-kern
Date: 08/26/1999 07:34:48
At 02:01 AM 8/26/99 , Manuel Bouyer wrote:
>2) I need to pass infos between the drivers for function 1 and function 2
> (pciide0 and pciide1) of the chip (the bus_space_tag/handles for the DMA
> setup and bus-master DMA registers). If I could get the softc of function 1
> from the function 2 driver this would be very nice.
> I could use a static variables to pass the softc, as I can't see why
> function 2 wouldn't be attached immediatly after function 1, buit this
> looks a bit gross.
>
>Any advice, please ?
You can use pciide_cd.cd_devs. Just iterate through them and make sure that
your dv_parent matches their dv_parent and save vendor/device id tag so you
can match that as well. I do this in the de driver to match romless devices
against the device with the rom.
--
Matt Thomas Internet: matt@3am-software.com
3am Software Foundry WWW URL: http://www.3am-software.com/bio/matt/
Cupertino, CA Disclaimer: I avow all knowledge of this message