Hello.
I have DM8168 configured as PCIe EP (with all hw modifications done and SWs set as per manuals) and PC as RC.
I use latest u-boot from Arago to boot from SPI in PCIe boot mode.
DM8168 takes power from PCIe slot (no external power).
PC is running Linux with Kernel built with PCIE_HOTPLUG=y.
When I turn system on ("cold" start) everything is fine: link is established
Setting up for pcie boot... PCIe link UP, waiting for boot from HOST...
and device can be seen with lspci on host:
04:00.0 Multimedia video controller: Texas Instruments Device b800 (rev 01)
Further I reset EP (in anyway: by hw reset button or by sw means) and behavior depends on host system: on some PCs(1) link is re-estabished (and all I need to do to continue operation - rescan PCI for re-enumeration and realod boot driver - that's fine), but on other PCs(2) link can't be re-established: there is "Setting up for pcie boot..." from u-boot, some time later reset from watchdog and everything repeats.
Furthermore if I do soft reboot (sodo reboot) even of "good" host PC(1) then link is established only once: if I reset EP in this case - after soft reboot of host RC - link can't be established.
I doesn't have PCI bus analyzer so I have no idea what is going on on link level and why link training fails in those cases.
I modified u-boot code to increase watchdog timeout and force gen1 link - nothing changed.
We have done HW modification to allow cold reset by WTD, so EP should behave exactly the same way in all cases and it seems problem is RC doesn't detect device / perform link training.
Any clue how to ensure reliable PCIe link establishing procedure?
I searched on forum - there are a lot of somewhat similar topics (mostly unanswered), but I didn't manage to find a solution.