Is there a environment can test PCIe 2 Lane mode, IDK only route out Lane0, now my customer have link up problem on 2 lane mode, after further debug, use only Lane 1 in 1x mode, also have problem. while if only use Lane 0, no problem.
So I want to ask if there is a environment to test it in advance.
Customer use PCIe communicate with FPGA, as FPGA firmware is dynamically load and boot, after each time FPGA firmware loaded, need to re-establish link-up PCIe, sometimes can't link-up at this point. The First time link up is always OK.
Did experiment, and compared result as below:
When link up successfully:
RC and EP status: Detect->Polling->Configuration->L0->Recovery->L0
When link up fail:
RC: Detect->Polling->Configuration->L0->Recovery->Detect_QUIET,
EP : Detect->Polling->Configuration->L0->Recovery->Detect->Polling
suspect the problem occurring at Recovery.Speed, as the first time use 2.5GT/S to enter L0, then LTSSM enter Recovery status to do Speed Change, change to 5GT/S, if success, enter L0, if not, enter Detect. in order to verify this, force PCIe_SS2 in Gen 1 mode, then won't enter Recovery.Speed stage, test result show no failure on link up.
summary:
#1. PCIe_SS1 2-Lane mode link up failure sometimes, and not stable, guess it is PCIe12_PHY problem.
#2. with same procedure, if only use PCIe_SS1+PCIe1_PHY, very stable. if use only PCIe_SS2 + PCIe2_PHY, sometimes Recovery Speed Change fail.
In Linux, customer rescan PCIe in below sequence:
#1. Load FPGA or reset PCIe Link.
#2. echo 1 > /sys/bus/pci/reinit (call kernel dra7xx_pcie_host_init())
#3. echo 1 > /sys/bus/pci/devices/0000:00:00.0/remove (call pci_stop_and_remove_bus_device)
#4. echo 1 > /sys/bus/pci/rescan
Are those sequence step right for re link-up PCIe?