[PATCH] pci_dev to device_node fix

Jake Moilanen moilanen at austin.ibm.com
Fri Mar 5 09:01:05 EST 2004

On the JS20's there was a recent FW change where it moved one of the
buses to busno 0.  There is also a bridge w/ a devfn of 0 on that bus.
While trying probing behind that bridge we try looking up the
device_node using the busno and devfn to read config space.  When we
call pci_device_to_OF_node() we'll pass in the devfn and busno only to
compare with to find the matching device_node.  Instead of getting the
bridge's device_node, we get the PHB's device_node, because there is an
assumption when setting up the PHB in update_dn_pci_info() that the
PHB's devfn is 0.  This will cause us to recursively go down the first
bridge and we actually die when trying to make duplicate entries in

This patch adds "is_phb" property to the device_node.  Since we are
trying to find a device_node from a pci_dev, we shouldn't worry about
PHB's since PHB's are stored in pci_controllers.  This change will allow
us to correctly get the device_node.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: linux-2.6-pci-dev-to-ofnode-fix-1.patch
Type: text/x-patch
Size: 2787 bytes
Desc: not available
Url : http://ozlabs.org/pipermail/linuxppc64-dev/attachments/20040304/94a7167f/attachment.bin 

More information about the Linuxppc64-dev mailing list