Date: Fri, 27 Jun 2003 19:51:15 +0200 From: Thomas Moestl <t.moestl@tu-bs.de> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-hackers@freebsd.org Subject: Re: PLEASE REVIEW: Adding a pci_if method to facilitate specialized PCI bus drivers Message-ID: <20030627175115.GA847@crow.dom2ip.de> In-Reply-To: <XFMail.20030627133700.jhb@FreeBSD.org> References: <20030613233104.GC670@crow.dom2ip.de> <XFMail.20030627133700.jhb@FreeBSD.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2003/06/27 at 13:37:00 -0400, John Baldwin wrote: > On 13-Jun-2003 Thomas Moestl wrote: > > This requires us to get this firmware property in the OFW PCI bus > > driver before routing the interrupt; that can't be done in the pcib > > route_interrupt method, since we don't know whether we are routing for > > another bridge (where we use whichever index we get passed) or for a > > child device (in which case we would need to look at the firmware > > property). > > Actually, can't you tell this by doing: > > if (device_get_parent(device_get_parent(dev)) == pcib) > /* Routing direct child. */ > else > /* Routing descedent of a child bridge. */ No, pcib will always be a grandparent of dev. When routing a descendant child bridge, dev will itself be the device_t of a bridge, otherwise it is that of the device we are routing to. - Thomas -- Thomas Moestl <t.moestl@tu-bs.de> http://www.tu-bs.de/~y0015675/ <tmm@FreeBSD.org> http://people.FreeBSD.org/~tmm/ PGP fingerprint: 1C97 A604 2BD0 E492 51D0 9C0F 1FE6 4F1D 419C 776C
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030627175115.GA847>