[PATCH] pci_dev to device_node fix
Benjamin Herrenschmidt
benh at kernel.crashing.org
Tue Mar 9 08:22:38 EST 2004
On Tue, 2004-03-09 at 05:01, Jake Moilanen wrote:
> On Fri, 2004-03-05 at 17:37, Benjamin Herrenschmidt wrote:
> > > The problem is, what do you set it to. A PHB doesn't have a devfn. You
> > > can't set it to -1, because there are sections of the code that will
> > > mask the devfn w/ 0xff and cause the same problem if there is a bridge
> > > is at devfn 0xff on a particular bus. The only clean way is to add an
> > > extra field in to note that this device_node is a PHB. That way it can
> > > ignore the devfn.
> >
> > And how do you deal with device nodes that aren't PCI ?
>
> Non-pci device_nodes shouldn't be the children of a PHB device_node in
> the device tree.
They can be grand-children at least (macio devices are an exemple, but
then devices on a southbridge).
Anyway, I still don't see the problem. The PHB proper is not part of
the PCI bus, or if it is, it will respond to a devfn normally.
(IMHO, the whole idea of adding those fields to struct device_node is
crap in the beginning, but it's a bit late to change that in 2.6)
Ben.
** Sent via the linuxppc64-dev mail list. See http://lists.linuxppc.org/
More information about the Linuxppc64-dev
mailing list