From: jgunthorpe@obsidianresearch•com (Jason Gunthorpe)
To: linux-arm-kernel@lists•infradead.org
Subject: Intel I350 mini-PCIe card (igb) on Mirabox (mvebu / Armada 370)
Date: Wed, 26 Mar 2014 14:12:43 -0600 [thread overview]
Message-ID: <20140326201243.GA1536@obsidianresearch.com> (raw)
In-Reply-To: <CAAfodu3HuzBCAc3r=PPufjrFhEKUQK2b_WRow=GJuC6hSqiuKw@mail.gmail.com>
On Wed, Mar 26, 2014 at 07:31:12PM +0000, Neil Greatorex wrote:
> > Sorry, it has a mistake, that is not how you detect CRS on this chip..
> >
> > CRS might be something the driver has to emulate as well.....
> >
> > This is better.. CRS will be bit 19 in the ICR
> I ran your patch. The dmesg output is available at
> https://gist.github.com/ngreatorex/9790164
>
> I'm afraid the output doesn't mean much to me :-)
This is the relevant bit:
[ 0.136040] mvebu-pcie pcie-controller.3: ICR is 0
[ 0.161162] mvebu-pcie pcie-controller.3: Vendor ID is ffffffff
[ 0.161170] mvebu-pcie pcie-controller.3: ICR is 800200
[ 1.170071] mvebu-pcie pcie-controller.3: Try 2: Vendor ID is ffffffff
[ 1.170083] mvebu-pcie pcie-controller.3: ICR is 808200
#1 The ICR indicates PexLinkFail and NFErrDet after the first vendor
read. I think PexLinkFail is very surprising, documentation says it
means there was an error on the link and it re-trained. Perhaps it
is a side effect of #2..
#2 It looks like I botched the format of the configuration since the NIC
didn't respond, I think I see why.
#3 After sleeping the PEX detected a UR or CA TLP, which is not
necessarily surprising, considering #2..
So, we need a result that actually reads the vendor id..
Here is a revision, I suspect the error with the debugging was not
calling mvebu_pcie_set_local_bus_nr, so a type 1 transaction was being
produced. I am looking for the 2nd Vendor ID to return 80861521.
Also, are you using the "reset-gpios" DT property?
diff --git a/drivers/pci/host/pci-mvebu.c b/drivers/pci/host/pci-mvebu.c
index b8f2fc9..6da4983 100644
--- a/drivers/pci/host/pci-mvebu.c
+++ b/drivers/pci/host/pci-mvebu.c
@@ -999,6 +999,38 @@ static int mvebu_pcie_probe(struct platform_device *pdev)
mvebu_pcie_set_local_dev_nr(port, 1);
+ /* Wait for the link to come up */
+ if (!mvebu_pcie_link_up(port)) {
+ unsigned int I;
+
+ dev_info(&pdev->dev, "Waiting for link up\n");
+ for (I = 0; I != 100; I++) {
+ udelay(100);
+ if (mvebu_pcie_link_up(port))
+ break;
+ }
+ dev_info(&pdev->dev, "Link is %u\n",
+ mvebu_pcie_link_up(port));
+ }
+
+ /* Clear and report the ICR */
+ mvebu_writel(port, 0, 0x1900);
+ dev_info(&pdev->dev, "ICR is %x\n", mvebu_readl(port, 0x1900));
+
+ /* Read the vendor ID from the connected device */
+ mvebu_pcie_set_local_bus_nr(port, 1);
+ mvebu_writel(port, PCIE_CONF_ADDR(1, 0, 0), PCIE_CONF_ADDR_OFF);
+ dev_info(&pdev->dev, "Vendor ID is %x\n",
+ mvebu_readl(port, PCIE_CONF_DATA_OFF));
+ dev_info(&pdev->dev, "ICR is %x\n", mvebu_readl(port, 0x1900));
+ mvebu_writel(port, 0, 0x1900);
+ msleep(1000);
+ mvebu_writel(port, PCIE_CONF_ADDR(1, 0, 0), PCIE_CONF_ADDR_OFF);
+ dev_info(&pdev->dev, "Try 2: Vendor ID is %x\n",
+ mvebu_readl(port, PCIE_CONF_DATA_OFF));
+ dev_info(&pdev->dev, "ICR is %x\n", mvebu_readl(port, 0x1900));
+
+
port->dn = child;
spin_lock_init(&port->conf_lock);
mvebu_sw_pci_bridge_init(port);
next prev parent reply other threads:[~2014-03-26 20:12 UTC|newest]
Thread overview: 69+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-25 20:07 Intel I350 mini-PCIe card (igb) on Mirabox (mvebu / Armada 370) Neil Greatorex
2014-03-25 20:20 ` Thomas Petazzoni
2014-03-25 21:03 ` Willy Tarreau
2014-03-25 20:22 ` Jason Gunthorpe
2014-03-25 20:36 ` Thomas Petazzoni
2014-03-25 21:12 ` Jason Gunthorpe
2014-03-25 21:23 ` Thomas Petazzoni
2014-03-25 22:03 ` Neil Greatorex
2014-03-25 22:24 ` Jason Gunthorpe
2014-03-25 22:35 ` Jason Gunthorpe
2014-03-26 19:31 ` Neil Greatorex
2014-03-26 20:12 ` Jason Gunthorpe [this message]
2014-03-26 20:34 ` Neil Greatorex
2014-03-26 21:42 ` Jason Gunthorpe
2014-03-26 21:52 ` Thomas Petazzoni
2014-03-27 0:29 ` Neil Greatorex
2014-03-27 4:40 ` Jason Gunthorpe
2014-03-28 1:03 ` Neil Greatorex
2014-03-28 2:04 ` Jason Gunthorpe
2014-04-04 13:19 ` Neil Greatorex
2014-04-05 17:32 ` Willy Tarreau
2014-04-05 17:34 ` Thomas Petazzoni
2014-04-05 18:04 ` Willy Tarreau
2014-04-05 18:55 ` Neil Greatorex
2014-04-05 19:03 ` Willy Tarreau
2014-04-05 19:00 ` Neil Greatorex
2014-04-06 15:34 ` Neil Greatorex
2014-04-06 17:43 ` Willy Tarreau
2014-04-08 15:13 ` Thomas Petazzoni
2014-04-08 15:40 ` Thomas Petazzoni
2014-04-08 15:55 ` Thomas Petazzoni
2014-04-08 16:02 ` Matthew Minter
2014-04-08 17:14 ` Jason Gunthorpe
2014-04-08 17:53 ` Willy Tarreau
2014-04-08 18:08 ` Jason Gunthorpe
2014-04-08 18:15 ` Thomas Petazzoni
2014-04-08 18:40 ` Jason Gunthorpe
2014-04-08 19:15 ` Willy Tarreau
2014-04-08 19:21 ` Jason Gunthorpe
2014-04-08 20:17 ` Matthew Minter
2014-04-08 21:50 ` Thomas Petazzoni
2014-04-08 20:19 ` Neil Greatorex
2014-04-08 20:43 ` Willy Tarreau
2014-04-08 18:01 ` Thomas Petazzoni
2014-04-08 18:22 ` Jason Gunthorpe
2014-04-08 18:32 ` Thomas Petazzoni
2014-04-08 15:53 ` Willy Tarreau
2014-04-08 16:00 ` Thomas Petazzoni
2014-04-08 16:05 ` Willy Tarreau
2014-04-06 18:58 ` Willy Tarreau
2014-04-06 19:11 ` Thomas Petazzoni
2014-04-06 21:57 ` Neil Greatorex
2014-04-06 22:04 ` Willy Tarreau
2014-04-06 22:16 ` Thomas Petazzoni
2014-04-07 0:50 ` Neil Greatorex
2014-04-07 17:41 ` Jason Gunthorpe
2014-04-07 19:41 ` Neil Greatorex
2014-04-07 20:48 ` Jason Gunthorpe
2014-04-07 21:58 ` Neil Greatorex
2014-04-08 6:28 ` Willy Tarreau
2014-04-08 6:40 ` Willy Tarreau
2014-04-08 10:53 ` Matthew Minter
2014-04-08 12:31 ` Matthew Minter
2014-04-08 12:36 ` Willy Tarreau
2014-04-08 14:43 ` Thomas Petazzoni
2014-04-08 14:52 ` Matthew Minter
2014-04-08 14:53 ` Willy Tarreau
2014-04-08 15:25 ` Thomas Petazzoni
2014-04-08 17:56 ` Willy Tarreau
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=20140326201243.GA1536@obsidianresearch.com \
--to=jgunthorpe@obsidianresearch$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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