On Tue, Nov 10, 2015 at 10:16:53PM +0800, Alex Shi wrote:
Hi Marc,
I hit some hard problem on the pcie backporting to 3.18. I tried to pick up pcie related change to 3.18 kernel, the result is here: git://git.linaro.org/kernel/linux-linaro-stable.git v3.18/topic/pcie/master
but it failed to setup juno r1 pcie port:
pci 0000:00:00.0: reg 0x10: [mem 0x57c00000-0x57c03fff 64bit pref] ... pcieport 0000:00:00.0: can't enable device: BAR 0 [mem 0x57c00000-0x57c03fff 64bit pref] not claimed pcieport: probe of 0000:00:00.0 failed with error -22 =====
The full pcie.txt log is attached.
I also tried to seek some clues from 3.18/4.1 commits comparing, as following command. but failed on leaking related experience. The 4.1 kernel with pcie backport works good.
$git log --oneline v3.18.24.. --cherry-mark --right-only 3.18/pcie/master...origin/v4.1/topic/pcie-junor1 &> full-4.1.diff.commits
Could you like to give me some comments here? How to do the debug or what I missed?
You need:
b97ea289cf6a ("PCI: Assign resources before drivers claim devices (pci_scan_root_bus()")
Otherwise the kernel tries to enable a PCI device with unassigned resources.
Let me know if that works for you.
Cheers, Lorenzo
Thanks a lot! Alex
PCI I/O : 0xffffffbffa000000 - 0xffffffbffb000000 ( 16 MB)
PCI: CLS 0 bytes, default 64 pci_hotplug: PCI Hot Plug PCI Core version: 0.5 pciehp: PCI Express Hot Plug Controller Driver version: 0.4 shpchp: Standard Hot Plug PCI Controller Driver version: 0.4 PCI host bridge /pcie-controller@40000000 ranges: pci-host-generic 40000000.pcie-controller: PCI host bridge to bus 0000:00 pci_bus 0000:00: root bus resource [bus 00-ff] pci_bus 0000:00: root bus resource [io 0x0000-0x7fffff] (bus address [0x5f800000-0x5fffffff]) pci_bus 0000:00: root bus resource [mem 0x50000000-0x57ffffff] pci_bus 0000:00: root bus resource [mem 0x4000000000-0x40ffffffff pref] pci_bus 0000:00: scanning bus pci 0000:00:00.0: [1556:1100] type 01 class 0x060400 pci 0000:00:00.0: reg 0x10: [mem 0x57c00000-0x57c03fff 64bit pref] pci 0000:00:00.0: supports D1 D2 pci 0000:00:00.0: PME# supported from D0 D1 D2 D3hot D3cold pci 0000:00:00.0: PME# disabled pci_bus 0000:00: fixups for bus pci 0000:00:00.0: scanning [bus 01-08] behind bridge, pass 0 pci 0000:00:00.0: scanning [bus 00-00] behind bridge, pass 1 pci_bus 0000:01: scanning bus pci 0000:01:00.0: [111d:8090] type 01 class 0x060400 pci 0000:01:00.0: PME# supported from D0 D3hot D3cold pci 0000:01:00.0: PME# disabled pci 0000:01:00.0: of_irq_parse_pci() failed with rc=-19 pci_bus 0000:01: fixups for bus pci 0000:01:00.0: scanning [bus 02-08] behind bridge, pass 0 pci 0000:01:00.0: scanning [bus 00-00] behind bridge, pass 1 pci_bus 0000:02: scanning bus pci 0000:02:01.0: [111d:8090] type 01 class 0x060400 ci 0000:02:02.0: of_irq_parse_pci() failed with rc=-19 pci 0000:02:03.0: [111d:8090] type 01 class 0x060400 pci 0000:02:03.0: PME# supported from D0 D3hot D3cold pci 0000:02:03.0: PME# disabled pci 0000:02:03.0: of_irq_parse_pci() failed with rc=-19 pci 0000:02:0c.0: [111d:8090] type 01 class 0x060400 pci 0000:02:0c.0: PME# supported from D0 D3hot D3cold pci 0000:02:0c.0: PME# disabled pci 0000:02:0c.0: of_irq_parse_pci() failed with rc=-19 pci 0000:02:10.0: [111d:8090] type 01 class 0x060400 pci 0000:02:10.0: PME# supported from D0 D3hot D3cold pci 0000:02:10.0: PME# disabled pci 0000:02:10.0: of_irq_parse_pci() failed with rc=-19 pci 0000:02:1f.0: [111d:8090] type 01 class 0x060400 pci 0000:02:1f.0: PME# supported from D0 D3hot D3cold pci 0000:02:1f.0: PME# disabled pci 0000:02:1f.0: of_irq_parse_pci() failed with rc=-19 pci_bus 0000:02: fixups for bus pci 0000:02:01.0: scanning [bus 03-03] behind bridge, pass 0 pci 0000:02:02.0: scanning [bus 04-04] behind bridge, pass 0 pci 0000:02:03.0: scanning [bus 05-05] behind bridge, pass 0 pci 0000:02:0c.0: scanning [bus 06-06] behind bridge, pass 0 pci 0000:02:10.0: scanning [bus 07-07] behind bridge, pass 0 pci 0000:02:1f.0: scanning [bus 08-08] behind bridge, pass 0 pci 0000:02:01.0: scanning [bus 00-00] behind bridge, pass 1 pci_bus 0000:03: scanning bus pci 0000:03:00.0: [1095:3132] type 00 class 0x018000 pci 0000:03:00.0: reg 0x10: [mem 0x57f04000-0x57f0407f 64bit] pci 0000:03:00.0: reg 0x18: [mem 0x57f00000-0x57f03fff 64bit] pci 0000:03:00.0: reg 0x20: initial BAR value 0x00000000 invalid 0000:03: busn_res: [bus 03-ff] end is updated to 03 pci 0000:02:02.0: scanning [bus 00-00] behind bridge, pass 1 pci_bus 0000:04: scanning bus pci 0000:04:00.0: [1912:0014] type 00 class 0x0c0330 pci 0000:04:00.0: reg 0x10: [mem 0x57e00000-0x57e01fff 64bit] pci 0000:04:00.0: PME# supported from D0 D3hot D3cold pci 0000:04:00.0: PME# disabled pci_bus 0000:04: fixups for bus pci_bus 0000:04: bus scan returning with max=04 pci_bus 0000:04: busn_res: [bus 04-ff] end is updated to 04 pci 0000:02:03.0: scanning [bus 00-00] behind bridge, pass 1 pci_bus 0000:05: scanning bus pci_bus 0000:05: fixups for bus pci_bus 0000:05: bus scan returning with max=05 pci_bus 0000:05: busn_res: [bus 05-ff] end is updated to 05 pci 0000:02:0c.0: scanning [bus 00-00] behind bridge, pass 1 pci_bus 0000:06: scanning bus pci_bus 0000:06: fixups for bus pci_bus 0000:06: bus scan returning with max=06 pci_bus 0000:06: busn_res: [bus 06-ff] end is updated to 06 pci 0000:02:10.0: scanning [bus 00-00] behind bridge, pass 1 pci_bus 0000:07: scanning bus pci_bus 0000:07: fixups for bus pci_bus 0000:07: bus scan returning with max=07 pci_bus 0000:07: busn_res: [bus 07-ff] end is updated to 07 pci 0000:02:1f.0: scanning [bus 00-00] behind bridge, pass 1 pci_bus 0000:08: scanning bus pci 0000:08:00.0: [11ab:4380] type 00 class 0x020000 pci 0000:08:00.0: reg 0x10: [mem 0x57d00000-0x57d03fff 64bit] pci 0000:08:00.0: reg 0x18: initial BAR value 0x00000000 invalid pci_bus 0000:08: busn_res: [bus 08-ff] end is updated to 08 pci_bus 0000:02: bus scan returning with max=08 pci_bus 0000:02: busn_res: [bus 02-ff] end is updated to 08 pci_bus 0000:01: bus scan returning with max=08 pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 08 pci_bus 0000:00: bus scan returning with max=08 pcieport 0000:00:00.0: can't enable device: BAR 0 [mem 0x57c00000-0x57c03fff 64bit pref] not claimed pcieport: probe of 0000:00:00.0 failed with error -22 pci 0000:00:00.0: can't enable device: BAR 0 [mem 0x57c00000-0x57c03fff 64bit pref] not claimed pci 0000:00:00.0: Error enabling bridge (-22), continuing pci 0000:00:00.0: can't enable device: BAR 0 [mem 0x57c00000-0x57c03fff 64bit pref] not claimed pci 0000:00:00.0: Error enabling bridge (-22), continuing pci 0000:00:00.0: can't enable device: BAR 0 [mem 0x57c00000-0x57c03fff 64bit pref] not claimed pci 0000:00:00.0: Error enabling bridge (-22), continuing pci 0000:00:00.0: can't enable device: BAR 0 [mem 0x57c00000-0x57c03fff 64bit pref] not claimed pci 0000:00:00.0: Error enabling bridge (-22), continuing pci 0000:00:00.0: can't enable device: BAR 0 [mem 0x57c00000-0x57c03fff 64bit pref] not claimed pci 0000:00:00.0: Error enabling bridge (-22), continuing pci 0000:00:00.0: can't enable device: BAR 0 [mem 0x57c00000-0x57c03fff 64bit pref] not claimed pci 0000:00:00.0: Error enabling bridge (-22), continuing pci 0000:00:00.0: can't enable device: BAR 0 [mem 0x57c00000-0x57c03fff 64bit pref] not claimed pci 0000:00:00.0: Error enabling bridge (-22), continuing pci 0000:04:00.0: calling quirk_usb_early_handoff+0x0/0x6c0 pci 0000:00:00.0: can't enable device: BAR 0 [mem 0x57c00000-0x57c03fff 64bit pref] not claimed pci 0000:00:00.0: Error enabling bridge (-22), continuing pci 0000:04:00.0: can't enable device: BAR 0 [mem 0x57e00000-0x57e01fff 64bit] not claimed pci 0000:04:00.0: Can't enable PCI device, BIOS handoff failed. pci 0000:00:00.0: fixup irq: got 34 pci 0000:00:00.0: assigning IRQ 34 pcieport 0000:01:00.0: fixup irq: got 0 pcieport 0000:02:03.0: assigning IRQ 00 pcieport 0000:02:0c.0: fixup irq: got 0 pcieport 0000:02:0c.0: assigning IRQ 00 pcieport 0000:02:10.0: fixup irq: got 0 pcieport 0000:02:10.0: assigning IRQ 00 pcieport 0000:02:1f.0: fixup irq: got 0 pcieport 0000:02:1f.0: assigning IRQ 00 pci 0000:03:00.0: fixup irq: got 35 pci 0000:03:00.0: assigning IRQ 35 pci 0000:04:00.0: fixup irq: got 36 pci 0000:04:00.0: assigning IRQ 36 pci 0000:08:00.0: fixup irq: got 37 pci 0000:08:00.0: assigning IRQ 37 pci 0000:00:00.0: BAR 8: assigned [mem 0x50000000-0x502fffff] pci 0000:00:00.0: BAR 0: assigned [mem 0x4000000000-0x4000003fff 64bit pref] pci 0000:00:00.0: BAR 7: assigned [io 0x1000-0x2fff] pcieport 0000:01:00.0: BAR 8: assigned [mem 0x50000000-0x502fffff] pcieport 0000:01:00.0: BAR 7: assigned [io 0x1000-0x2fff] pcieport 0000:02:01.0: BAR 8: assigned [mem 0x50000000-0x500fffff] pcieport 0000:02:02.0: BAR 8: assigned [mem 0x50100000-0x501fffff] pcieport 0000:02:1f.0: BAR 8: assigned [mem 0x50200000-0x502fffff] pcieport 0000:02:01.0: BAR 7: assigned [io 0x1000-0x1fff] pcieport 0000:02:1f.0: BAR 7: assigned [io 0x2000-0x2fff] pci 0000:03:00.0: BAR 6: assigned [mem 0x50000000-0x5007ffff pref] pci 0000:03:00.0: BAR 2: assigned [mem 0x50080000-0x50083fff 64bit] pci 0000:03:00.0: BAR 0: assigned [mem 0x50084000-0x5008407f 64bit] pci 0000:03:00.0: BAR 4: assigned [io 0x1000-0x107f] pci 0000:04:00.0: BAR 0: assigned [mem 0x50100000-0x50101fff 64bit] pci 0000:08:00.0: BAR 0: assigned [mem 0x50200000-0x50203fff 64bit] pci 0000:08:00.0: BAR 2: assigned [io 0x2000-0x20ff] pci 0000:00:00.0: PCI bridge to [bus 01-08] pci 0000:00:00.0: bridge window [io 0x1000-0x2fff] pci 0000:00:00.0: bridge window [mem 0x50000000-0x502fffff] ehci-pci: EHCI PCI platform driver ohci-pci: OHCI PCI platform driver
linaro-kernel mailing list linaro-kernel@lists.linaro.org https://lists.linaro.org/mailman/listinfo/linaro-kernel