This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: TDA4: PCIe link down

Part Number: TDA4VM

hi TI teams,

Our custmoer´s tda4 board PCIe sometimes link down, When the interrupt link_state is triggered

< 74.667038> 2021-03-23 07:49:32 [ 9.983846]I[c0: cp: 219]j721e-pcie 2920000.pcie: LINK DOWN!

 pcie2_rc: pcie@2920000 {
                compatible = "ti,j721e-pcie-host";
                reg = <0x00 0x02920000 0x00 0x1000>,
                      <0x00 0x02927000 0x00 0x400>,
                      <0x00 0x0e000000 0x00 0x00800000>,
                      <0x44 0x00000000 0x00 0x00001000>;
                reg-names = "intd_cfg", "user_cfg", "reg", "cfg";
                interrupt-names = "link_state";
                interrupts = <GIC_SPI 342 IRQ_TYPE_EDGE_RISING>;

After the PCIe link down, the system shutdown print the abort log, we found the abort caused by reading the register u32 csts = readl(dev->bar + NVME_REG_CSTS);

coule you please help to deal , thanks

ERROR: Unhandled External Abort received on 0x80000000 from S-EL1
ERROR: exception reason=0 syndrome=0xbf000000
Unhandled Exception from EL1
x0 = 0x0000000000000018
x1 = 0xfffffc0820330000
x2 = 0x0000000000000000
x3 = 0x0000000000000000
x4 = 0x0000000000000000
x5 = 0x0000000000000000
x6 = 0xfffffe00117e5ad8
x7 = 0x0000000000002ffd
x8 = 0x00000000ffffefff
x9 = 0xfffffe00100a8630
x10 = 0x0000000000000039
x11 = 0x2ce33e6c02ce33e7
x12 = 0xfffffe0011d4f7ef
x13 = 0x0000000000000006
x14 = 0xfffffe0091d4f7e7
x15 = 0xffffffffffffffff
x16 = 0x00a3d70a3d70a3d6
x17 = 0x0000000000000000
x18 = 0x0000000000000030
x19 = 0xfffffc082298e000
x20 = 0xfffffc082298e2d0
x21 = 0xfffffc08248650a0
x22 = 0xfffffc082298e310
x23 = 0x0000000000000001
x24 = 0x0000000000000000
x25 = 0xfffffe0011105af0
x26 = 0xfffffe0011105b00
x27 = 0xfffffc0824865120
x28 = 0xfffffc0820330000
x29 = 0xfffffe0011d4fb70
x30 = 0xfffffe001091b3bc
scr_el3 = 0x000000000000073d
sctlr_el3 = 0x0000000030cd183f
cptr_el3 = 0x0000000000000000
tcr_el3 = 0x0000000080803520
daif = 0x00000000000002c0
mair_el3 = 0x00000000004404ff
spsr_el3 = 0x0000000060000005
elr_el3 = 0xfffffe001091b3c8
ttbr0_el3 = 0x0000000070010c00
esr_el3 = 0x00000000bf000000
far_el3 = 0x0000000000000000
spsr_el1 = 0x0000000000000005
elr_el1 = 0xfffffe00100a9ca8
spsr_abt = 0x0000000000000000
spsr_und = 0x0000000000000000
spsr_irq = 0x0000000000000000
spsr_fiq = 0x0000000000000000
sctlr_el1 = 0x0000000034d4d91d
actlr_el1 = 0x0000000000000000
cpacr_el1 = 0x0000000000300000
csselr_el1 = 0x0000000000000000
sp_el1 = 0xfffffe0011d4fb70
esr_el1 = 0x0000000056000000
ttbr0_el1 = 0x00000008a67b0000
ttbr1_el1 = 0x0342000083230000
mair_el1 = 0x000c0400bb44ffff
amair_el1 = 0x0000000000000000
tcr_el1 = 0x00000034f5d67596
tpidr_el1 = 0xfffffe086e640000
tpidr_el0 = 0x000003ff920607a0
tpidrro_el0 = 0x0000000000000000
par_el1 = 0x0000000000000000
mpidr_el1 = 0x0000000080000000
afsr0_el1 = 0x0000000000000000
afsr1_el1 = 0x0000000000000000
contextidr_el1 = 0x0000000000000000
vbar_el1 = 0xfffffe0010010800
cntp_ctl_el0 = 0x0000000000000005
cntp_cval_el0 = 0x00000004b5b6d878
cntv_ctl_el0 = 0x0000000000000000
cntv_cval_el0 = 0x0000000000000000
cntkctl_el1 = 0x00000000000000d6
sp_el0 = 0x000000007000a3d0
isr_el1 = 0x0000000000000040
dacr32_el2 = 0x0000000000000000
ifsr32_el2 = 0x0000000000000000
cpuectlr_el1 = 0x0000001b00000040
cpumerrsr_el1 = 0x0000000000000000
l2merrsr_el1 = 0x0000000000000000

static void nvme_dev_disable(struct nvme_dev *dev, bool shutdown)
{
        bool dead = true, freeze = false;
        struct pci_dev *pdev = to_pci_dev(dev->dev);

        mutex_lock(&dev->shutdown_lock);
        if (pci_is_enabled(pdev)) {
                u32 csts = readl(dev->bar + NVME_REG_CSTS);

                if (dev->ctrl.state == NVME_CTRL_LIVE ||
                    dev->ctrl.state == NVME_CTRL_RESETTING) {
                        freeze = true;
                        nvme_start_freeze(&dev->ctrl);
                }
                dead = !!((csts & NVME_CSTS_CFS) || !(csts & NVME_CSTS_RDY) ||
                        pdev->error_state  != pci_channel_io_normal);
        }

        /*
         * Give the controller a chance to complete all entered requests if
         * doing a safe shutdown.
         */
        if (!dead && shutdown && freeze)
                nvme_wait_freeze_timeout(&dev->ctrl, NVME_IO_TIMEOUT);

  • Could some people help me? thanks

    Line 432: [ 2.523676] j721e_pcie_probe 503
    Line 433: [ 2.527012] j721e_pcie_probe 550
    Line 434: [ 2.530412] j721e-pcie 2920000.pcie: host bridge /bus@100000/pcie@2920000 ranges:
    Line 434: [ 2.530412] j721e-pcie 2920000.pcie: host bridge /bus@100000/pcie@2920000 ranges:
    Line 434: [ 2.530412] j721e-pcie 2920000.pcie: host bridge /bus@100000/pcie@2920000 ranges:
    Line 435: [ 2.538081] j721e-pcie 2920000.pcie: IO 0x4400001000..0x4400010fff -> 0x0000001000
    Line 435: [ 2.538081] j721e-pcie 2920000.pcie: IO 0x4400001000..0x4400010fff -> 0x0000001000
    Line 436: [ 2.546363] j721e-pcie 2920000.pcie: MEM 0x4400011000..0x4407ffffff -> 0x0000011000
    Line 436: [ 2.546363] j721e-pcie 2920000.pcie: MEM 0x4400011000..0x4407ffffff -> 0x0000011000
    Line 437: [ 2.554644] j721e-pcie 2920000.pcie: IB MEM 0x0000000000..0xffffffffffff -> 0x0000000000
    Line 437: [ 2.554644] j721e-pcie 2920000.pcie: IB MEM 0x0000000000..0xffffffffffff -> 0x0000000000
    Line 438: [ 2.563103] j721e_pcie_probe 593
    Line 480: [ 2.912432] j721e_pcie_probe 503
    Line 481: [ 2.915716] j721e_pcie_probe 550
    Line 482: [ 2.918986] j721e-pcie 2920000.pcie: host bridge /bus@100000/pcie@2920000 ranges:
    Line 482: [ 2.918986] j721e-pcie 2920000.pcie: host bridge /bus@100000/pcie@2920000 ranges:
    Line 482: [ 2.918986] j721e-pcie 2920000.pcie: host bridge /bus@100000/pcie@2920000 ranges:
    Line 483: [ 2.926473] j721e-pcie 2920000.pcie: IO 0x4400001000..0x4400010fff -> 0x0000001000
    Line 483: [ 2.926473] j721e-pcie 2920000.pcie: IO 0x4400001000..0x4400010fff -> 0x0000001000
    Line 484: [ 2.934558] j721e-pcie 2920000.pcie: MEM 0x4400011000..0x4407ffffff -> 0x0000011000
    Line 484: [ 2.934558] j721e-pcie 2920000.pcie: MEM 0x4400011000..0x4407ffffff -> 0x0000011000
    Line 485: [ 2.942643] j721e-pcie 2920000.pcie: IB MEM 0x0000000000..0xffffffffffff -> 0x0000000000
    Line 485: [ 2.942643] j721e-pcie 2920000.pcie: IB MEM 0x0000000000..0xffffffffffff -> 0x0000000000
    Line 486: [ 2.950905] j721e_pcie_probe 593
    Line 487: [ 2.955421] cdns_pcie_host_setup 478
    Line 488: [ 2.959016] cdns_pcie_host_setup 504
    Line 489: [ 2.962585] cdns_pcie_host_setup 515
    Line 490: [ 2.966152] cdns_pcie_host_start_link
    Line 503: [ 3.067455] j721e-pcie 2920000.pcie: Link up
    Line 503: [ 3.067455] j721e-pcie 2920000.pcie: Link up
    Line 504: [ 3.071745] cdns_pcie_host_setup 531
    Line 505: [ 3.075385] j721e-pcie 2920000.pcie: PCI host bridge to bus 0000:00
    Line 505: [ 3.075385] j721e-pcie 2920000.pcie: PCI host bridge to bus 0000:00
    Line 538: [ 3.296885] pci 0000:01:00.0: 15.752 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x2 link at 0000:00:00.0 (capable of 31.504 Gb/s with 8.0 GT/s PCIe x4 link)
    Line 538: [ 3.296885] pci 0000:01:00.0: 15.752 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x2 link at 0000:00:00.0 (capable of 31.504 Gb/s with 8.0 GT/s PCIe x4 link)
    Line 538: [ 3.296885] pci 0000:01:00.0: 15.752 Gb/s available PCIe bandwidth, limited by 8.0 GT/s PCIe x2 link at 0000:00:00.0 (capable of 31.504 Gb/s with 8.0 GT/s PCIe x4 link)
    Line 551: [ 3.392918] pcieport 0000:00:00.0: enabling device (0000 -> 0002)
    Line 557: [ 3.404262] pcieport 0000:00:00.0: PME: Signaling with IRQ 485
    Line 562: [ 3.436338] j721e_pcie_probe 678
    Line 888: [ 9.502724] j721e- 2920000.pcie: LINK DOWN!