PCIe AVC8000 card not getting IRQ 0

Hello,

I am trying to use an AVC8000 nano PCIe card on a Toradex Apalis-iMX6 reference board 1.1A with an imx6q SoM. I have asked for help from Advanced Micro and they have given me an updated kernel driver and patch. I am using 3.14.28 kernel. The results I am getting are the same with or without the driver update. So now it seems to be something else and I am unsure where to investigate right now. I am leaning towards the PCI bus as being the problem. But how do I debug this? I have posted the PCI boot messages that shows that this seems to be the issue. The card is seen as 0000:04:00.0 below. Where do I go from here?

I have searched google for possible “can’t get IRQ 0” solutions and ACPI seems to be a big help. I have attempted to look for ACPI in 3.14.28 and it does not exist. I figured I should try and post and ask for help but will continue to search around for possible ideas.

Thank you for your time in reading.

Cheers,
Pete

[    3.778837] imx6q-pcie 1ffc000.pcie: Configuration forces GEN1
[    3.779042] imx6q-pcie 1ffc000.pcie: PCI host bridge to bus 0000:00
[    3.779053] pci_bus 0000:00: root bus resource [io  0x1000-0x10000]
[    3.779062] pci_bus 0000:00: root bus resource [mem 0x01000000-0x01efffff]
[    3.779070] pci_bus 0000:00: root bus resource [bus 00-ff]
[    3.779438] PCI: bus0: Fast back to back transfers disabled
[    3.799290] PCI: bus1: Fast back to back transfers disabled
[    3.799307] pci 0000:01:00.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.803733] PCI: bus2: Fast back to back transfers disabled
[    3.803749] pci 0000:02:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.803798] pci 0000:02:02.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.803846] pci 0000:02:03.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    3.804322] PCI: bus3: Fast back to back transfers enabled
[    3.804903] pci 0000:04:00.0: Setting PCI class for AVC8000 PCIe device
[    3.806241] PCI: bus4: Fast back to back transfers disabled
[    3.806696] PCI: bus5: Fast back to back transfers enabled
[    3.806868] pci 0000:02:01.0: of_irq_parse_pci() failed with rc=-22
[    3.806913] pci 0000:02:02.0: of_irq_parse_pci() failed with rc=-22
[    3.806958] pci 0000:02:03.0: of_irq_parse_pci() failed with rc=-22
[    3.807020] pci 0000:04:00.0: of_irq_parse_pci() failed with rc=-22
[    3.807276] pci 0000:00:00.0: BAR 0: assigned [mem 0x01000000-0x010fffff]
[    3.807288] pci 0000:00:00.0: BAR 8: assigned [mem 0x01100000-0x013fffff]
[    3.807297] pci 0000:00:00.0: BAR 9: assigned [mem 0x01400000-0x016fffff pref]
[    3.807305] pci 0000:00:00.0: BAR 6: assigned [mem 0x01700000-0x0170ffff pref]
[    3.807312] pci 0000:00:00.0: BAR 7: assigned [io  0x1000-0x1fff]
[    3.807324] pci 0000:01:00.0: BAR 8: assigned [mem 0x01100000-0x012fffff]
[    3.807332] pci 0000:01:00.0: BAR 9: assigned [mem 0x01400000-0x016fffff pref]
[    3.807338] pci 0000:01:00.0: BAR 0: assigned [mem 0x01300000-0x01303fff]
[    3.807364] pci 0000:01:00.0: BAR 7: assigned [io  0x1000-0x1fff]
[    3.807375] pci 0000:02:01.0: BAR 8: assigned [mem 0x01100000-0x012fffff]
[    3.807385] pci 0000:02:01.0: BAR 9: assigned [mem 0x01400000-0x015fffff 64bit pref]
[    3.807393] pci 0000:02:02.0: BAR 9: assigned [mem 0x01600000-0x016fffff pref]
[    3.807400] pci 0000:02:01.0: BAR 7: assigned [io  0x1000-0x1fff]
[    3.807406] pci 0000:02:01.0: PCI bridge to [bus 03]
[    3.807422] pci 0000:02:01.0:   bridge window [io  0x1000-0x1fff]
[    3.807455] pci 0000:02:01.0:   bridge window [mem 0x01100000-0x012fffff]
[    3.807479] pci 0000:02:01.0:   bridge window [mem 0x01400000-0x015fffff 64bit pref]
[    3.807523] pci 0000:04:00.0: BAR 0: assigned [mem 0x01600000-0x01600fff pref]
[    3.807547] pci 0000:02:02.0: PCI bridge to [bus 04]
[    3.807598] pci 0000:02:02.0:   bridge window [mem 0x01600000-0x016fffff pref]
[    3.807637] pci 0000:02:03.0: PCI bridge to [bus 05]
[    3.807721] pci 0000:01:00.0: PCI bridge to [bus 02-05]
[    3.807735] pci 0000:01:00.0:   bridge window [io  0x1000-0x1fff]
[    3.807767] pci 0000:01:00.0:   bridge window [mem 0x01100000-0x012fffff]
[    3.807790] pci 0000:01:00.0:   bridge window [mem 0x01400000-0x016fffff pref]
[    3.807829] pci 0000:00:00.0: PCI bridge to [bus 01-05]
[    3.807835] pci 0000:00:00.0:   bridge window [io  0x1000-0x1fff]
[    3.807844] pci 0000:00:00.0:   bridge window [mem 0x01100000-0x013fffff]
[    3.807851] pci 0000:00:00.0:   bridge window [mem 0x01400000-0x016fffff pref]
[    3.808172] pcieport 0000:00:00.0: Signaling PME through PCIe PME interrupt
[    3.808179] pci 0000:01:00.0: Signaling PME through PCIe PME interrupt
[    3.808183] pci 0000:02:01.0: Signaling PME through PCIe PME interrupt
[    3.808188] pci 0000:02:02.0: Signaling PME through PCIe PME interrupt
[    3.808192] pci 0000:04:00.0: Signaling PME through PCIe PME interrupt
[    3.808197] pci 0000:02:03.0: Signaling PME through PCIe PME interrupt
[    3.808784] PCI: enabling device 0000:01:00.0 (0140 -> 0143)
[    3.809778] pcieport 0000:02:01.0: device [10b5:8605] has invalid IRQ; check vendor BIOS
[    3.809803] PCI: enabling device 0000:02:01.0 (0140 -> 0143)
[    3.810871] pcieport 0000:02:02.0: device [10b5:8605] has invalid IRQ; check vendor BIOS
[    3.810895] PCI: enabling device 0000:02:02.0 (0140 -> 0143)
[    3.811883] pcieport 0000:02:03.0: device [10b5:8605] has invalid IRQ; check vendor BIOS
[    3.811907] PCI: enabling device 0000:02:03.0 (0140 -> 0143)
[    3.812955] PCI: enabling device 0000:04:00.0 (0140 -> 0142)
[    3.813011] avc8k[0]: subsystem: 0000:0000
[    3.814222] avc8k[0]: registered device video 0 [v4l2]
[    3.823154] avc8k[0]: registered device video 1 [v4l2]
[    3.831863] avc8k[0]: registered device video 2 [v4l2]
[    3.840592] avc8k[0]: registered device video 3 [v4l2]
[    3.849321] avc8k[0]: registered device video 4 [v4l2]
[    3.858044] avc8k[0]: registered device video 5 [v4l2]
[    3.866799] avc8k[0]: registered device video 6 [v4l2]
[    3.875533] avc8k[0]: registered device video 7 [v4l2]
[    3.884483] avc8k[0]: found at 0000:04:00.0, bus: 4, rev: 1, irq: 0, latency: 0, mmio: 0x1600000, device:0x6869
[    3.884499] avc8k[0]: can't get IRQ 0
[    3.885371] avc8k: probe of 0000:04:00.0 failed with error -22

lspci output

root@b2qt-apalis-imx6:~# lspci
00:00.0 PCI bridge: Synopsys, Inc. Device abcd (rev 01)
01:00.0 PCI bridge: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch (rev ab)
02:01.0 PCI bridge: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch (rev ab)
02:02.0 PCI bridge: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch (rev ab)
02:03.0 PCI bridge: PLX Technology, Inc. PEX 8605 PCI Express 4-port Gen2 Switch (rev ab)
04:00.0 Unclassified device [0004]: Techwell Inc. Device 6869 (rev 01)
root@b2qt-apalis-imx6:~#

The hint about ACPI might be true for x86 systems, but there are no ACPI tables in the ARM world (at least not in the i.MX 6 BSP)… Typically IRQ get assigned through the device tree, however the PCIe bus is discover-able, it seems that in this case a valid IRQ should be part of the PCI platform data…

Did you tried this driver? It seems that others were successfully using that driver on i.MX6:

Thanks for the response and the info on ACPI. Good to know that this is a dead end.

Yes, I actually started using the TW6869 driver because a bunch of people online said they used this with the 3.14.28 kernel and it worked. The difference is the board. And between using the TW6869 driver and the updated avc8k driver, both get the same results. So I’m fairly confident that it isn’t the driver.

Hi Peter

What exact version of the 3.14.28 kernel are you using? e.g. what is the output of uname -a ?
There have been a bunch of PCIe related fixes in the 3.14.28 branch before we moved on to upstream 3.14.52.
You might also consider to move to 3.14.52 before digging any deeper into the issue.

Max

Thank you for your reply max.

For 3.14.28:

uname -a
Linux b2qt-apalis-imx6 3.14.28-v2.6b1+g0bb38d1 #1 SMP Tue Jul 12 09:45:08 EDT 2016 armv7l GNU/Linux

From “meta-toradex/recipes-kernel/linux/linux-toradex-fsl_git.bb”:

PR_mx6 = "V2.5b3"
SRCREV_mx6 = "0632def1c9981e3974f724025f39b2c1588d8ee6"
SRCBRANCH_mx6 = "toradex_imx_3.14.28_1.0.0_ga"

For 3.14.52:

root@b2qt-apalis-imx6:~# uname -a
Linux b2qt-apalis-imx6 3.14.28-v2.6b1+g0bb38d1 #3 SMP Wed Jul 13 09:53:31 EDT 2016 armv7l GNU/Linux

I add this to “meta-toradex/recipes-kernel/linux/linux-toradex-fsl_git.bb”:

PR_mx6 = "-v2.6b2"
SRCREV_mx6 = "7c83cef87116c0b2aaaf867f406831643306d3d1"
SRCBRANCH_mx6 = "toradex_imx_3.14.52_1.1.0_ga"

I tried the 3.14.52 with the TW68 driver first and the kernel caused a panic once the pci started loading. I removed the TW68 driver and installed the AVC8000 supplied driver from the manufacturer and it still gives the “Can’t get irq 0” result and it doesn’t crash.

This morning, I tried the driver you suggested and it does not crash nor does it give any indication that it is connected. The one thing I can check is if /dev/video0-7 exist and they do not exist.

I changed the device tree file from a long time ago and things are initializing as expected with the drivers. I haven’t used it, but I do see them in the /dev/ folder. To note, I did not create my own and have only been using the supplied ones from building. Note that I use the Qt build environment that uses bitbake with meta-toradex and yocto etc.