pci_pcie_cap invalid on AER/EEH enabled PPC?

Benjamin Herrenschmidt benh at kernel.crashing.org
Wed Jul 6 12:42:50 EST 2011

> On Power PC platforms, set_pcie_port_type() is not called.  On Power PC,
> pci_dev structure is initialized by of_create_pci_dev().  However, the
> structure member pcie_cap is NOT computed nor set in this function.

Just a quick correction here, please don't say "On Power PC platforms"
such generic statements that only apply to IBM pSeries platforms running
under pHyp :-)

There's plenty of other platforms supported in arch/powerpc that have
very different characteristics and use more "generic" code to build
their PCI layout.

> The information used to populate pci_dev comes from the Power PC
> device_tree passed to the OS by Open Firmware.
> Based upon standing Power PC design, we cannot support patches
> which replace pci_find_capability(pdef, PCI_CAP_ID_EXP) with
> pci_is_pcie(pdev) on Power PC platforms.

No, that isn't correct. We can (and should) fix our arch code to do the
right thing. There is no reason why those two wouldn't be equivalent.

If we are missing a call to set_pcie_port_type() then we should add it,
however if I look at our upstream code, pci_of_scan.c seems to be
calling that, so it could be a missing backport ?

Can you try with an upstream kernel ?


More information about the Linuxppc-dev mailing list