Subject: Intel I350 mini-PCIe card (igb) on Mirabox (mvebu / Armada 370)

From: [email-masked] (Thomas Petazzoni)
Date: Tue, 25 Mar 2014 22:23:25 +0100

Dear Jason Gunthorpe,

On Tue, 25 Mar 2014 15:12:40 -0600, Jason Gunthorpe wrote:
> On Tue, Mar 25, 2014 at 09:36:38PM +0100, Thomas Petazzoni wrote:
> 
> > We have recently identified a weird thing on Armada 38x, maybe previous
> > revisions are affected as well. We haven't fully understood the problem
> > yet, but the following patch allows PCIe devices to be detected in all
> > situations on Armada 38x. It seems like setting the local device number
> > requires "some time" to be taken into account.
> 
> What was the value of mvebu_pcie_link_up around this point?
> 
> PHY training would be the most likely time sensitive thing to muck up
> discovery..

The link is up, but the PCIe device is not visible under the right
bus/device number until we call mvebu_pcie_set_local_dev_nr(), and wait
about 50-100 microseconds. By "not visible", I mean reading the
vendor/product ID from the PCI configuration space returns
0xffff:0xffff, while after waiting 50-100 us, the right value is read.

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com