linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Eran Liberty <liberty@extricom.com>
To: Xianghua Xiao <x.xiao@freescale.com>,
	ZHANG WEI <wei.zhang@freescale.com>,
	Roy Zang <tie-fei.zang@freescale.com>,
	Tony Li <tony.li@freescale.com>,
	Linas Vepstas <linas@austin.ibm.com>,
	linux-pci@vger.kernel.org, linuxppc-dev@ozlabs.org
Subject: Freescale P2020 / 85xx PCIe and Advance Error Reporting (AER) service problem
Date: Thu, 07 Oct 2010 14:30:51 +0200	[thread overview]
Message-ID: <4CADBD7B.3000506@extricom.com> (raw)

Dear Penguins,

SHORT:
There is a BUG in the current code design / Freescale P2020/85xx PCIe design that prevent it from registering to the PCIe AER... or that I have missed something :) ..

LESS SHORT:
I am in the process of a Freescale P2020 based board bring up. P2020 is basically two 85xx processors and their peripherals share most features.

PCIe has a very extensive error reporting section and the Kernel already has a very nice looking Advanced Error Reporting driver.

I encounter difficulties trying to connect the P2020/85xx PCIe device to this AER service driver.

My technical findings follows:

 - pcie_portdrv_probe() will be called for every BRIDGE class PCI device. P2020 PCIe is a PCI-PCI BRIDGE class so no problem here. 
 - The code will continue to check that we have PCI_CAP_ID_EXP capability, which we have and continue to pcie_port_device_register().
 - Now ,the function pcie_port_device_register() will FAIL. It will fail because it will call assign_interrupt_mode(), return with PCIE_PORT_NO_IRQ, and giveup with a reasonable remark in the code
"/*
  * Don't use service devices that require interrupts if there is
  * no way to generate them.
  */"

So now the question is why calling assign_interrupt_mode() with the P2020 PCIe ROOT device return empty? Well...
 - First assign_interrupt_mode() will test for PCIE_PORT_MSIX_MODE. Freescale PCIe does not support this...
 - Second attampt is made to discover PCIE_PORT_MSI_MODE, which Freescale should support but the PCIe PCI_CAP_ID_MSI capability is published on the device side of the bridge and NOT on the PCIe ROOT device, which is the one probed and thus fails.
 - Last it attempts to look at "dev->pin" in order to set PCIE_PORT_INTx_MODE. On top of being the less recommended way (the old way), The Freescale PCIE ROOT device pin is not set anywhere.

Failing all those the probe fails and the AER service is not activated for the PCIE device.

QUESTION:
1. What am I missing?
2. Has anyone enabled the AER PCIe service for P2020/MPC85xx?
3. Should the PCIe ROOT end report MSI capabilities or should the device end report itself as bridge ???

-- Liberty

             reply	other threads:[~2010-10-07 12:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 12:30 Eran Liberty [this message]
2010-10-07 14:42 ` Freescale P2020 / 85xx PCIe and Advance Error Reporting (AER) service problem Kumar Gala
2010-10-10 10:02   ` Eran Liberty
2010-10-11  0:19 ` Benjamin Herrenschmidt
2010-10-11 10:21   ` Eran Liberty
2010-10-11 11:32     ` Benjamin Herrenschmidt
2010-10-17 19:24       ` Freescale P2020 CPU Freeze over PCIe abort signal Eran Liberty
2010-10-18  5:26         ` Bin Meng
2010-10-18  9:52         ` tiejun.chen
2010-10-18 11:44           ` Eran Liberty
2010-10-18 18:00         ` Eran Liberty
2010-10-19 16:53           ` Eran Liberty

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4CADBD7B.3000506@extricom.com \
    --to=liberty@extricom.com \
    --cc=linas@austin.ibm.com \
    --cc=linux-pci@vger.kernel.org \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=tie-fei.zang@freescale.com \
    --cc=tony.li@freescale.com \
    --cc=wei.zhang@freescale.com \
    --cc=x.xiao@freescale.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).