* Problems with PCI-E devices not being detected with switch @ 2008-10-15 15:47 Ayman El-Khashab 2008-10-16 5:20 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 17+ messages in thread From: Ayman El-Khashab @ 2008-10-15 15:47 UTC (permalink / raw) To: linuxppc-dev I am using the stock canyonlands 460EX development board. I have=20 the 4L (port 1) configured as a root-complex. I also have a SIL pci-e sata card. When I plug the sata card directly into the=20 canyonlands, everything works as expected. The sil is detected in Linux and I can read/write the disk. The sil is a 3531. The next step is to place this on the other side of a PCI-E switch. The particular switch is a PLX 8509. I connect this to the 4L port and then connect the sil to a 1L port on the 8509. When u-boot comes up, it detects all of the switch ports and the 3531 correctly.=20 The problem occurs when Linux boots. It sees the switch (and looking in /sys/bus/... confirms it), but nothing on the downstream sides of the switch (secondary busses) is visible. There were no boot messages to indicate it had seen the Sil 3531 and it doesn't function. We've=20 also tried other PCI-E devices (NI GPIB) on the downstream side and they are also not detected, so it seems to be something in Linux, my configuration, etc. I've included the boot messages below from u-boot and the kernel. It is more than just the pci boot messages, but I was not sure if something else in the log with provide some insight. Thanks Ayman -- AND: 128 MiB PCI: Bus Dev VenId DevId Class Int PCIE0: link is not up. PCIE0: initialization as root-complex failed PCIE1: successfully set as root-complex 03 01 10b5 8509 0604 00 03 02 10b5 8509 0604 00 06 00 1095 3531 0180 00 03 03 10b5 8509 0604 00 03 04 10b5 8509 0604 00 02 00 10b5 8509 0604 00 Net: ppc_4xx_eth0, ppc_4xx_eth1 Type run flash_nfs to mount root filesystem over NFS Hit any key to stop autoboot: 0 Waiting for PHY auto negotiation to complete.. done ENET Speed is 100 Mbps - FULL duplex connection (EMAC0) BOOTP broadcast 1 BOOTP broadcast 2 BOOTP broadcast 3 *** Unhandled DHCP Option in OFFER/ACK: 7 *** Unhandled DHCP Option in OFFER/ACK: 44 *** Unhandled DHCP Option in OFFER/ACK: 7 *** Unhandled DHCP Option in OFFER/ACK: 44 DHCP client bound to address 169.254.0.102 ## Booting kernel from Legacy Image at fc000000 ... Image Name: Linux-2.6.27-rc6-01149-g59c72dc- Created: 2008-09-18 22:17:29 UTC Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size: 1616554 Bytes =3D 1.5 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Uncompressing Kernel Image ... OK ## Flattened Device Tree blob at fc1e0000 Booting using the fdt blob at 0xfc1e0000 ## Loading init Ramdisk from Legacy Image at fc200000 ... Image Name: Tanisys Ramdisk Image Created: 2008-09-18 20:29:45 UTC Image Type: PowerPC Linux RAMDisk Image (gzip compressed) Data Size: 3320775 Bytes =3D 3.2 MB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK Loading Device Tree to 007fc000, end 007ff0c0 ... OK Loading Ramdisk to 06cd5000, end 06fffbc7 ... OK Using Canyonlands machine description Linux version 2.6.27-rc6-01149-g59c72dc-dirty (aymane@vbox) (gcc version = 4.2.2) #9 Thu Sep 18 17:17:19 CDT 2008 Found initrd at 0xc6cd5000:0xc6fffbc7 Zone PFN ranges: DMA 0x00000000 -> 0x00007000 Normal 0x00007000 -> 0x00007000 HighMem 0x00007000 -> 0x00007000 Movable zone start PFN for each node early_node_map[1] active PFN ranges 0: 0x00000000 -> 0x00007000 Built 1 zonelists in Zone order, mobility grouping on. Total pages: = 28448 Kernel command line: ramdisk_size=3D65536 root=3D/dev/ram rw mem=3D112M = ip=3D169.254.0.1 02:169.254.0.100:169.254.0.100:255.255.255.0:tanosx:eth0:off panic=3D1 = console=3Dtty S0,115200 UIC0 (32 IRQ sources) at DCR 0xc0 UIC1 (32 IRQ sources) at DCR 0xd0 UIC2 (32 IRQ sources) at DCR 0xe0 UIC3 (32 IRQ sources) at DCR 0xf0 PID hash table entries: 512 (order: 9, 2048 bytes) clocksource: timebase mult[500000] shift[22] registered Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) Memory: 106764k/114688k available (3188k kernel code, 7784k reserved, = 124k data, 138k bss, 160k init) SLUB: Genslabs=3D10, HWalign=3D32, Order=3D0-3, MinObjects=3D0, = CPUs=3D1, Nodes=3D1 Calibrating delay loop... 1597.44 BogoMIPS (lpj=3D3194880) Mount-cache hash table entries: 512 net_namespace: 288 bytes NET: Registered protocol family 16 256k L2-cache enabled PCIE0: Checking link... PCIE0: No device detected. PCI host bridge /plb/pciex@d00000000 (primary) ranges: MEM 0x0000000e00000000..0x0000000e7fffffff -> 0x0000000080000000 IO 0x0000000f80000000..0x0000000f8000ffff -> 0x0000000000000000 4xx PCI DMA offset set to 0x00000000 PCIE0: successfully set as endpoint PCIE1: Checking link... PCIE1: Device detected, waiting for link... PCIE1: link is up ! PCI host bridge /plb/pciex@d20000000 (primary) ranges: MEM 0x0000000e80000000..0x0000000effffffff -> 0x0000000080000000 IO 0x0000000f80010000..0x0000000f8001ffff -> 0x0000000000000000 4xx PCI DMA offset set to 0x00000000 PCIE1: successfully set as root-complex PCI host bridge /plb/pci@c0ec00000 (primary) ranges: MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000 IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000 4xx PCI DMA offset set to 0x00000000 PCI: Probing PCI hardware PCI: Hiding 4xx host bridge resources 0000:40:00.0 PCI: Hiding 4xx host bridge resources 0001:80:00.0 pci 0001:81:00.0: PME# supported from D0 D3hot D3cold pci 0001:81:00.0: PME# disabled PCI: bridge 0001:80:00.0 io port: [0, fff] PCI: bridge 0001:80:00.0 32bit mmio: [b8000000, b81fffff] pci 0001:02:00.0: unknown header type 03, ignoring device pci 0001:02:01.0: unknown header type 41, ignoring device pci 0001:02:02.0: unknown header type 03, ignoring device pci 0001:02:03.0: unknown header type 41, ignoring device pci 0001:02:04.0: ignoring class 1d09 (doesn't match header type 02) pci 0001:02:05.0: unknown header type 41, ignoring device pci 0001:02:06.0: ignoring class 1d09 (doesn't match header type 02) pci 0001:02:07.0: unknown header type 41, ignoring device pci 0001:02:08.0: unknown header type 03, ignoring device pci 0001:02:09.0: unknown header type 41, ignoring device pci 0001:02:0a.0: ignoring class 7d09 (doesn't match header type 02) pci 0001:02:0b.0: unknown header type 41, ignoring device pci 0001:02:0c.0: ignoring class 1d01 (doesn't match header type 02) pci 0001:02:0d.0: unknown header type 41, ignoring device pci 0001:02:0e.0: ignoring class 7d09 (doesn't match header type 02) pci 0001:02:0f.0: unknown header type 41, ignoring device pci 0001:02:10.0: unknown header type 03, ignoring device pci 0001:02:11.0: unknown header type 41, ignoring device pci 0001:02:12.0: unknown header type 03, ignoring device pci 0001:02:13.0: unknown header type 41, ignoring device pci 0001:02:14.0: unknown header type 03, ignoring device pci 0001:02:15.0: unknown header type 41, ignoring device pci 0001:02:16.0: ignoring class 3d09 (doesn't match header type 02) pci 0001:02:17.0: unknown header type 41, ignoring device pci 0001:02:18.0: unknown header type 03, ignoring device pci 0001:02:19.0: unknown header type 41, ignoring device pci 0001:02:1a.0: unknown header type 03, ignoring device pci 0001:02:1b.0: unknown header type 41, ignoring device pci 0001:02:1c.0: ignoring class 5d01 (doesn't match header type 02) pci 0001:02:1d.0: unknown header type 41, ignoring device pci 0001:02:1e.0: unknown header type 03, ignoring device pci 0001:02:1f.0: unknown header type 41, ignoring device PCI: bridge 0001:81:00.0 32bit mmio: [b8100000, b81fffff] pci 0001:02:04.0: not setting up bridge for bus 0001:03 pci 0001:02:06.0: not setting up bridge for bus 0001:07 pci 0001:02:0a.0: not setting up bridge for bus 0001:0b pci 0001:02:0c.0: not setting up bridge for bus 0001:0f pci 0001:02:0e.0: not setting up bridge for bus 0001:13 pci 0001:02:16.0: not setting up bridge for bus 0001:17 pci 0001:02:1c.0: not setting up bridge for bus 0001:1b pci 0001:81:00.0: PCI bridge, secondary bus 0001:02 pci 0001:81:00.0: IO window: disabled pci 0001:81:00.0: MEM window: disabled pci 0001:81:00.0: PREFETCH window: disabled pci 0001:80:00.0: PCI bridge, secondary bus 0001:81 pci 0001:80:00.0: IO window: disabled pci 0001:80:00.0: MEM window: 0x80000000-0x800fffff pci 0001:80:00.0: PREFETCH window: disabled bus: 40 index 0 io port: [fffc0000, fffcffff] bus: 40 index 1 mmio: [e00000000, e7fffffff] bus: 80 index 0 io port: [fffe0000, fffeffff] bus: 80 index 1 mmio: [e80000000, effffffff] bus: 81 index 0 mmio: [fffe0000, fffe0fff] bus: 81 index 1 mmio: [e80000000, e800fffff] bus: 81 index 2 mmio: [0, 0] bus: 81 index 3 mmio: [0, 0] bus: 02 index 0 mmio: [0, 0] bus: 02 index 1 mmio: [eb8100000, eb81fffff] bus: 02 index 2 mmio: [0, 0] bus: 02 index 3 mmio: [0, 0] bus: 03 index 0 mmio: [0, 0] bus: 03 index 1 mmio: [0, 0] bus: 03 index 2 mmio: [0, 0] bus: 03 index 3 mmio: [0, 0] bus: 07 index 0 mmio: [0, 0] bus: 07 index 1 mmio: [0, 0] bus: 07 index 2 mmio: [0, 0] bus: 07 index 3 mmio: [0, 0] bus: 0b index 0 mmio: [0, 0] bus: 0b index 1 mmio: [0, 0] bus: 0b index 2 mmio: [0, 0] bus: 0b index 3 mmio: [0, 0] bus: 0f index 0 mmio: [0, 0] bus: 0f index 1 mmio: [0, 0] bus: 0f index 2 mmio: [0, 0] bus: 0f index 3 mmio: [0, 0] bus: 13 index 0 mmio: [0, 0] bus: 13 index 1 mmio: [0, 0] bus: 13 index 2 mmio: [0, 0] bus: 13 index 3 mmio: [0, 0] bus: 17 index 0 mmio: [0, 0] bus: 17 index 1 mmio: [0, 0] bus: 17 index 2 mmio: [0, 0] bus: 17 index 3 mmio: [0, 0] bus: 1b index 0 mmio: [0, 0] bus: 1b index 1 mmio: [0, 0] bus: 1b index 2 mmio: [0, 0] bus: 1b index 3 mmio: [0, 0] bus: 00 index 0 io port: [0, ffff] bus: 00 index 1 mmio: [d80000000, dffffffff] SCSI subsystem initialized usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb NET: Registered protocol family 2 IP route cache hash table entries: 1024 (order: 0, 4096 bytes) TCP established hash table entries: 4096 (order: 3, 32768 bytes) TCP bind hash table entries: 4096 (order: 2, 16384 bytes) TCP: Hash tables configured (established 4096 bind 4096) TCP reno registered NET: Registered protocol family 1 checking if image is initramfs...it isn't (no cpio magic); looks like an = initrd Freeing initrd memory: 3242k freed SATA port disabled via device-tree JFFS2 version 2.2. (NAND) =C2=A9 2001-2006 Red Hat, Inc. msgmni has been set to 215 io scheduler noop registered io scheduler anticipatory registered (default) io scheduler deadline registered io scheduler cfq registered pcieport-driver 0001:80:00.0: found MSI capability pcieport-driver 0001:81:00.0: found MSI capability aer: probe of 0001:80:00.0:pcie01 failed with error -38 pci_hotplug: PCI Hot Plug PCI Core version: 0.5 fakephp: Fake PCI Hot Plug Controller Driver Serial: 8250/16550 driver4 ports, IRQ sharing enabled serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq =3D 20) is a 16550A console [ttyS0] enabled serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq =3D 21) is a 16550A serial8250.0: ttyS2 at MMIO 0x4ef600500 (irq =3D 29) is a 16550A serial8250.0: ttyS3 at MMIO 0x4ef600600 (irq =3D 22) is a 16550A 4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq =3D 20) is a 16550A 4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq =3D 21) is a 16550A 4ef600500.serial: ttyS2 at MMIO 0x4ef600500 (irq =3D 29) is a 16550A 4ef600600.serial: ttyS3 at MMIO 0x4ef600600 (irq =3D 22) is a 16550A brd: module loaded PPC 4xx OCP EMAC driver, version 3.54 MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels ZMII /plb/opb/emac-zmii@ef600d00 initialized RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support TAH /plb/opb/emac-tah@ef601350 initialized TAH /plb/opb/emac-tah@ef601450 initialized /plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:10:ec:01:02:b9 eth0: found Generic MII PHY (0x00) /plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode eth1: EMAC-1 /plb/opb/ethernet@ef600f00, MAC 00:10:ec:81:02:b9 eth1: found Generic MII PHY (0x01) Driver 'sd' needs updating - please use bus_type methods 4cc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank Amd/Fujitsu Extended Query Table at 0x0040 4cc000000.nor_flash: CFI does not contain boot bank location. Assuming = top. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. RedBoot partition parsing not available Creating 7 MTD partitions on "4cc000000.nor_flash": 0x00000000-0x001e0000 : "kernel" 0x001e0000-0x00200000 : "dtb" 0x00200000-0x01600000 : "ramdisk" 0x01600000-0x01a00000 : "jffs2" 0x01a00000-0x03f60000 : "user" 0x03f60000-0x03fa0000 : "env" 0x03fa0000-0x04000000 : "u-boot" NDFC NAND Driver initialized. Chip-Rev: 0x00000111 NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB = 3,3V 8-b it) Scanning device for bad blocks Bad eraseblock 764 at 0x05f80000 Number of partitions 3 Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit": 0x00000000-0x00100000 : "u-boot" 0x00100000-0x00140000 : "env" 0x00140000-0x08000000 : "content" ppc-of-ohci 4bffd0000.usb: OF OHCI ppc-of-ohci 4bffd0000.usb: new USB bus registered, assigned bus number 1 ppc-of-ohci 4bffd0000.usb: irq 38, io mem 0x4bffd0000 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected usb usb1: New USB device found, idVendor=3D1d6b, idProduct=3D0001 usb usb1: New USB device strings: Mfr=3D3, Product=3D2, SerialNumber=3D1 usb usb1: Product: OF OHCI usb usb1: Manufacturer: Linux 2.6.27-rc6-01149-g59c72dc-dirty ohci_hcd usb usb1: SerialNumber: PPC-OF USB Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. dwc_otg: version 2.60a 22-NOV-2006 dwc_otg: Shared Tx FIFO mode dwc_otg: Using Slave mode dwc_otg dwc_otg.0: DWC OTG Controller dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 2 dwc_otg dwc_otg.0: irq 28, io mem 0x00000000 dwc_otg: dwc_otg_core_host_init: Unable to clear halt on channel 1 dwc_otg: Init: Port Power? op_state=3D4 usb usb2: configuration #1 chosen from 1 choice hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected usb usb2: New USB device found, idVendor=3D1d6b, idProduct=3D0002 usb usb2: New USB device strings: Mfr=3D3, Product=3D2, SerialNumber=3D1 usb usb2: Product: DWC OTG Controller usb usb2: Manufacturer: Linux 2.6.27-rc6-01149-g59c72dc-dirty = dwc_otg_hcd usb usb2: SerialNumber: dwc_otg.0 i2c /dev entries driver rtc-m41t80 0-0068: chip found, driver version 0.05 rtc-m41t80 0-0068: rtc core: registered m41t80 as rtc0 ibm-iic 4ef600700.i2c: using standard (100 kHz) mode ibm-iic 4ef600800.i2c: using standard (100 kHz) mode 24c01a EEPROM driver initialized TCP cubic registered NET: Registered protocol family 17 RPC: Registered udp transport module. RPC: Registered tcp transport module. rtc-m41t80 0-0068: setting system clock to 2008-10-15 11:59:27 UTC = (1224071967) eth0: link is up, 100 FDX, pause enabled IP-Config: Complete: device=3Deth0, addr=3D169.254.0.102, mask=3D255.255.255.0, = gw=3D169.254.0.100, host=3Dtanosx, domain=3D, nis-domain=3D(none), bootserver=3D169.254.0.100, rootserver=3D169.254.0.100, rootpath=3D RAMDISK: Compressed image found at block 0 VFS: Mounted root (ext2 filesystem). Freeing unused kernel memory: 160k init ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Problems with PCI-E devices not being detected with switch 2008-10-15 15:47 Problems with PCI-E devices not being detected with switch Ayman El-Khashab @ 2008-10-16 5:20 ` Benjamin Herrenschmidt 2008-10-16 8:03 ` Stefan Roese 2008-10-16 15:01 ` Ayman El-Khashab 0 siblings, 2 replies; 17+ messages in thread From: Benjamin Herrenschmidt @ 2008-10-16 5:20 UTC (permalink / raw) To: Ayman El-Khashab; +Cc: Stefan Roese, linuxppc-dev, Victor Gallardo On Wed, 2008-10-15 at 10:47 -0500, Ayman El-Khashab wrote: Note for people on CC: This is a problem on 460EX on a canyonland using the 4x port. > The problem occurs when Linux boots. It sees the switch (and looking > in /sys/bus/... confirms it), but nothing on the downstream sides of > the switch (secondary busses) is visible. There were no boot messages > to indicate it had seen the Sil 3531 and it doesn't function. We've > also tried other PCI-E devices (NI GPIB) on the downstream side and > they are also not detected, so it seems to be something in Linux, my > configuration, etc. I've included the boot messages below from u-boot > and the kernel. It is more than just the pci boot messages, but I was > not sure if something else in the log with provide some insight. The messages below look really fishy indeed: > pci 0001:02:00.0: unknown header type 03, ignoring device > pci 0001:02:01.0: unknown header type 41, ignoring device > pci 0001:02:02.0: unknown header type 03, ignoring device > pci 0001:02:03.0: unknown header type 41, ignoring device > pci 0001:02:04.0: ignoring class 1d09 (doesn't match header type 02) > pci 0001:02:05.0: unknown header type 41, ignoring device > pci 0001:02:06.0: ignoring class 1d09 (doesn't match header type 02) > pci 0001:02:07.0: unknown header type 41, ignoring device > pci 0001:02:08.0: unknown header type 03, ignoring device > pci 0001:02:09.0: unknown header type 41, ignoring device > pci 0001:02:0a.0: ignoring class 7d09 (doesn't match header type 02) > pci 0001:02:0b.0: unknown header type 41, ignoring device > pci 0001:02:0c.0: ignoring class 1d01 (doesn't match header type 02) > pci 0001:02:0d.0: unknown header type 41, ignoring device > pci 0001:02:0e.0: ignoring class 7d09 (doesn't match header type 02) > pci 0001:02:0f.0: unknown header type 41, ignoring device > pci 0001:02:10.0: unknown header type 03, ignoring device > pci 0001:02:11.0: unknown header type 41, ignoring device > pci 0001:02:12.0: unknown header type 03, ignoring device > pci 0001:02:13.0: unknown header type 41, ignoring device > pci 0001:02:14.0: unknown header type 03, ignoring device > pci 0001:02:15.0: unknown header type 41, ignoring device > pci 0001:02:16.0: ignoring class 3d09 (doesn't match header type 02) > pci 0001:02:17.0: unknown header type 41, ignoring device > pci 0001:02:18.0: unknown header type 03, ignoring device > pci 0001:02:19.0: unknown header type 41, ignoring device > pci 0001:02:1a.0: unknown header type 03, ignoring device > pci 0001:02:1b.0: unknown header type 41, ignoring device > pci 0001:02:1c.0: ignoring class 5d01 (doesn't match header type 02) > pci 0001:02:1d.0: unknown header type 41, ignoring device > pci 0001:02:1e.0: unknown header type 03, ignoring device > pci 0001:02:1f.0: unknown header type 41, ignoring device Stefan, do you reckon it could be that we aren't leaving enough time for the things behind the switch to initialize ? Or could there be a subtle kernel bug here ? It looks to me that config space access behind the switch is broken. Ayman, can you try adding a long delay (such as msleep(5000), ie 5s) at the beginning of pcibios_init() in arch/powerpc/kernel/pci_32.c ? This will add 5s delay between the init/reset of the port and the probing by linux. Do that help ? Stefan, shouldn't we find a nice way to avoid the whole port reset and reconfiguration of the HW also when uboot already did a good enough job, maybe via some device-tree property ? It would also significantly speed up boot times. Cheers, Ben. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Problems with PCI-E devices not being detected with switch 2008-10-16 5:20 ` Benjamin Herrenschmidt @ 2008-10-16 8:03 ` Stefan Roese 2008-10-16 8:29 ` Benjamin Herrenschmidt 2008-10-16 15:01 ` Ayman El-Khashab 1 sibling, 1 reply; 17+ messages in thread From: Stefan Roese @ 2008-10-16 8:03 UTC (permalink / raw) To: benh; +Cc: Ayman El-Khashab, Victor Gallardo, linuxppc-dev On Thursday 16 October 2008, Benjamin Herrenschmidt wrote: > > pci 0001:02:1c.0: ignoring class 5d01 (doesn't match header type 02) > > pci 0001:02:1d.0: unknown header type 41, ignoring device > > pci 0001:02:1e.0: unknown header type 03, ignoring device > > pci 0001:02:1f.0: unknown header type 41, ignoring device > > Stefan, do you reckon it could be that we aren't leaving enough time > for the things behind the switch to initialize ? Or could there be > a subtle kernel bug here ? It looks to me that config space > access behind the switch is broken. Yes, this could be possible. We (Ayman) should at least test with the delay as you mentioned below to see if this helps. > Ayman, can you try adding a long delay (such as msleep(5000), ie 5s) > at the beginning of pcibios_init() in arch/powerpc/kernel/pci_32.c ? > This will add 5s delay between the init/reset of the port and the > probing by linux. Do that help ? > > Stefan, shouldn't we find a nice way to avoid the whole port reset and > reconfiguration of the HW also when uboot already did a good enough job, > maybe via some device-tree property ? It would also significantly speed > up boot times. Doing this unconditionally is not a good idea since we could have an old (buggy) firmware which didn't configure the PCIe controller correctly. But I really like your idea with the device-tree property to optionally skip this re-configuration. Now we only need to find some "volunteer" to do this job... ;) Best regards, Stefan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Problems with PCI-E devices not being detected with switch 2008-10-16 8:03 ` Stefan Roese @ 2008-10-16 8:29 ` Benjamin Herrenschmidt 2008-10-16 8:48 ` Stefan Roese 0 siblings, 1 reply; 17+ messages in thread From: Benjamin Herrenschmidt @ 2008-10-16 8:29 UTC (permalink / raw) To: Stefan Roese; +Cc: Ayman El-Khashab, Victor Gallardo, linuxppc-dev On Thu, 2008-10-16 at 10:03 +0200, Stefan Roese wrote: > Doing this unconditionally is not a good idea since we could have an old > (buggy) firmware which didn't configure the PCIe controller correctly. But I > really like your idea with the device-tree property to optionally skip this > re-configuration. Now we only need to find some "volunteer" to do this > job... ;) I don't have a problem adding support for testing that property and skipping most of the initial HW setup, basically treating the endpoint as pre-configured. What about using a value for "status" ? Or an empty "configured" property ? Ideally, it should have been the other way around, ie "unconfigured" for old/buggy stuff but I'm worried there may be existing out-of-tree device-trees without it :-) Cheers, Ben ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Problems with PCI-E devices not being detected with switch 2008-10-16 8:29 ` Benjamin Herrenschmidt @ 2008-10-16 8:48 ` Stefan Roese 2008-10-16 8:58 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 17+ messages in thread From: Stefan Roese @ 2008-10-16 8:48 UTC (permalink / raw) To: benh; +Cc: Ayman El-Khashab, Victor Gallardo, linuxppc-dev On Thursday 16 October 2008, Benjamin Herrenschmidt wrote: > On Thu, 2008-10-16 at 10:03 +0200, Stefan Roese wrote: > > Doing this unconditionally is not a good idea since we could have an old > > (buggy) firmware which didn't configure the PCIe controller correctly. > > But I really like your idea with the device-tree property to optionally > > skip this re-configuration. Now we only need to find some "volunteer" to > > do this job... ;) > > I don't have a problem adding support for testing that property and > skipping most of the initial HW setup, basically treating the endpoint > as pre-configured. > > What about using a value for "status" ? No. "status" is already used to disable/skip the PCIe slot completely. For example on Canyonlands where PCIe#0 is multiplexed with the SATA port. > Or an empty "configured" > property ? Ideally, it should have been the other way around, ie > "unconfigured" for old/buggy stuff but I'm worried there may be existing > out-of-tree device-trees without it :-) Yeah. I could add this "configured" property to the current U-Boot version. Perhaps we should add some version information to it so that Linux could eventually decide to re-configure when the "configured" version is known to be buggy. What do you think? Best regards, Stefan ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Problems with PCI-E devices not being detected with switch 2008-10-16 8:48 ` Stefan Roese @ 2008-10-16 8:58 ` Benjamin Herrenschmidt 0 siblings, 0 replies; 17+ messages in thread From: Benjamin Herrenschmidt @ 2008-10-16 8:58 UTC (permalink / raw) To: Stefan Roese; +Cc: Ayman El-Khashab, Victor Gallardo, linuxppc-dev On Thu, 2008-10-16 at 10:48 +0200, Stefan Roese wrote: > Yeah. I could add this "configured" property to the current U-Boot version. > Perhaps we should add some version information to it so that Linux could > eventually decide to re-configure when the "configured" version is known to > be buggy. What do you think? I'd rather have the platform have a way to override it rather than having tests for uboot versions in the pci code itself. Ben. ^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: Problems with PCI-E devices not being detected with switch 2008-10-16 5:20 ` Benjamin Herrenschmidt 2008-10-16 8:03 ` Stefan Roese @ 2008-10-16 15:01 ` Ayman El-Khashab 2008-10-16 21:19 ` Benjamin Herrenschmidt 2008-10-17 0:10 ` Benjamin Herrenschmidt 1 sibling, 2 replies; 17+ messages in thread From: Ayman El-Khashab @ 2008-10-16 15:01 UTC (permalink / raw) To: linuxppc-dev Benjamin Herrenschmidt wrote: > On Wed, 2008-10-15 at 10:47 -0500, Ayman El-Khashab wrote: >=20 > Note for people on CC: This is a problem on 460EX on a canyonland > using the 4x port.=20 >=20 >> The problem occurs when Linux boots. It sees the switch (and looking >> in /sys/bus/... confirms it), but nothing on the downstream sides of >> the switch (secondary busses) is visible. There were no boot >> messages to indicate it had seen the Sil 3531 and it doesn't >> function. We've also tried other PCI-E devices (NI GPIB) on the >> downstream side and they are also not detected, so it seems to be >> something in Linux, my configuration, etc. I've included the boot >> messages below from u-boot and the kernel. It is more than just the >> pci boot messages, but I was not sure if something else in the log >> with provide some insight.=20 >=20 > The messages below look really fishy indeed: >=20 >> pci 0001:02:00.0: unknown header type 03, ignoring device pci >> 0001:02:01.0: unknown header type 41, ignoring device pci >> 0001:02:02.0: unknown header type 03, ignoring device pci >> 0001:02:03.0: unknown header type 41, ignoring device pci >> 0001:02:04.0: ignoring class 1d09 (doesn't match header type 02) pci >> 0001:02:05.0: unknown header type 41, ignoring device pci >> 0001:02:06.0: ignoring class 1d09 (doesn't match header type 02) pci >> 0001:02:07.0: unknown header type 41, ignoring device pci >> 0001:02:08.0: unknown header type 03, ignoring device pci >> 0001:02:09.0: unknown header type 41, ignoring device pci >> 0001:02:0a.0: ignoring class 7d09 (doesn't match header type 02) pci >> 0001:02:0b.0: unknown header type 41, ignoring device pci >> 0001:02:0c.0: ignoring class 1d01 (doesn't match header type 02) pci >> 0001:02:0d.0: unknown header type 41, ignoring device pci >> 0001:02:0e.0: ignoring class 7d09 (doesn't match header type 02) pci >> 0001:02:0f.0: unknown header type 41, ignoring device pci >> 0001:02:10.0: unknown header type 03, ignoring device pci >> 0001:02:11.0: unknown header type 41, ignoring device pci >> 0001:02:12.0: unknown header type 03, ignoring device pci >> 0001:02:13.0: unknown header type 41, ignoring device pci >> 0001:02:14.0: unknown header type 03, ignoring device pci >> 0001:02:15.0: unknown header type 41, ignoring device pci >> 0001:02:16.0: ignoring class 3d09 (doesn't match header type 02) pci >> 0001:02:17.0: unknown header type 41, ignoring device pci >> 0001:02:18.0: unknown header type 03, ignoring device pci >> 0001:02:19.0: unknown header type 41, ignoring device pci >> 0001:02:1a.0: unknown header type 03, ignoring device pci >> 0001:02:1b.0: unknown header type 41, ignoring device pci >> 0001:02:1c.0: ignoring class 5d01 (doesn't match header type 02) pci >> 0001:02:1d.0: unknown header type 41, ignoring device pci >> 0001:02:1e.0: unknown header type 03, ignoring device pci >> 0001:02:1f.0: unknown header type 41, ignoring device >=20 >=20 > Ayman, can you try adding a long delay (such as msleep(5000), ie 5s) > at the beginning of pcibios_init() in arch/powerpc/kernel/pci_32.c ?=20 > This will add 5s delay between the init/reset of the port and the > probing by linux. Do that help ?=20 >=20 Thanks for your help. I did try a 5s delay and other than the boot taking an extra couple of seconds, there was no change. The messages above "unknown header" still showed up. Downstream devices were not found. BTW, this is with both the Denx kernel tree and the official 2.6.27 kernel. =20 Both have the same results. One added note, just to rule out bad electronics, I have confirmed that the switch+sata work correctly together if placed into a plain x86 pc with 2.6.24. So the electronics are fine. Ayman ^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: Problems with PCI-E devices not being detected with switch 2008-10-16 15:01 ` Ayman El-Khashab @ 2008-10-16 21:19 ` Benjamin Herrenschmidt 2008-10-17 0:10 ` Benjamin Herrenschmidt 1 sibling, 0 replies; 17+ messages in thread From: Benjamin Herrenschmidt @ 2008-10-16 21:19 UTC (permalink / raw) To: Ayman El-Khashab; +Cc: linuxppc-dev On Thu, 2008-10-16 at 10:01 -0500, Ayman El-Khashab wrote: > > Thanks for your help. I did try a 5s delay and other than the boot > taking an extra couple of seconds, there was no change. The messages > above "unknown header" still showed up. Downstream devices were not > found. > BTW, this is with both the Denx kernel tree and the official 2.6.27 > kernel. > Both have the same results. One added note, just to rule out bad > electronics, > I have confirmed that the switch+sata work correctly together if placed > into a plain x86 pc with 2.6.24. So the electronics are fine. I think I know where the problem comes from. The bus numbers aren't getting properly assigned below the root bus. I'm working on some test patches, I'll let you know when I have something. Cheers, Ben. ^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: Problems with PCI-E devices not being detected with switch 2008-10-16 15:01 ` Ayman El-Khashab 2008-10-16 21:19 ` Benjamin Herrenschmidt @ 2008-10-17 0:10 ` Benjamin Herrenschmidt 2008-10-17 7:22 ` Stefan Roese 2008-10-17 14:54 ` Ayman El-Khashab 1 sibling, 2 replies; 17+ messages in thread From: Benjamin Herrenschmidt @ 2008-10-17 0:10 UTC (permalink / raw) To: Ayman El-Khashab; +Cc: linuxppc-dev, Stefan Roese On Thu, 2008-10-16 at 10:01 -0500, Ayman El-Khashab wrote: > Benjamin Herrenschmidt wrote: > > On Wed, 2008-10-15 at 10:47 -0500, Ayman El-Khashab wrote: > > > > Note for people on CC: This is a problem on 460EX on a canyonland > > using the 4x port. > > > >> The problem occurs when Linux boots. It sees the switch (and looking > >> in /sys/bus/... confirms it), but nothing on the downstream sides of > >> the switch (secondary busses) is visible. There were no boot > >> messages to indicate it had seen the Sil 3531 and it doesn't > >> function. We've also tried other PCI-E devices (NI GPIB) on the > >> downstream side and they are also not detected, so it seems to be > >> something in Linux, my configuration, etc. I've included the boot > >> messages below from u-boot and the kernel. It is more than just the > >> pci boot messages, but I was not sure if something else in the log > >> with provide some insight. > > > > The messages below look really fishy indeed: Ok, can you send me a full dmesg log with "debug" on the kernel command line after adding a #define DEBUG 1 to the top of drivers/pci/probe.c please ? (before the batch of #include). The generic code is _supposed_ to somewhat figure out that bridges haven't been setup by the firmware and fix that up, but for some reason it's not happening I think. Or something else is wrong ... Stefan, I could use the same log from your customer too. Thanks, Ben. ^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: Problems with PCI-E devices not being detected with switch 2008-10-17 0:10 ` Benjamin Herrenschmidt @ 2008-10-17 7:22 ` Stefan Roese 2008-10-17 14:54 ` Ayman El-Khashab 1 sibling, 0 replies; 17+ messages in thread From: Stefan Roese @ 2008-10-17 7:22 UTC (permalink / raw) To: benh; +Cc: Ayman El-Khashab, linuxppc-dev On Friday 17 October 2008, Benjamin Herrenschmidt wrote: > Ok, can you send me a full dmesg log with "debug" on the kernel command > line after adding a #define DEBUG 1 to the top of drivers/pci/probe.c > please ? (before the batch of #include). > > The generic code is _supposed_ to somewhat figure out that bridges > haven't been setup by the firmware and fix that up, but for some reason > it's not happening I think. Or something else is wrong ... > > Stefan, I could use the same log from your customer too. OK. I'll try to provide those logs quickly. Best regards, Stefan ^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: Problems with PCI-E devices not being detected with switch 2008-10-17 0:10 ` Benjamin Herrenschmidt 2008-10-17 7:22 ` Stefan Roese @ 2008-10-17 14:54 ` Ayman El-Khashab 2008-10-17 21:05 ` Benjamin Herrenschmidt 2008-10-17 21:19 ` Benjamin Herrenschmidt 1 sibling, 2 replies; 17+ messages in thread From: Ayman El-Khashab @ 2008-10-17 14:54 UTC (permalink / raw) To: linuxppc-dev Benjamin Herrenschmidt wrote: > On Thu, 2008-10-16 at 10:01 -0500, Ayman El-Khashab wrote: >> Benjamin Herrenschmidt wrote: >>> On Wed, 2008-10-15 at 10:47 -0500, Ayman El-Khashab wrote: >>>=20 >>> Note for people on CC: This is a problem on 460EX on a canyonland >>> using the 4x port.=20 >>>=20 >=20 > Ok, can you send me a full dmesg log with "debug" on the kernel > command line after adding a #define DEBUG 1 to the top of > drivers/pci/probe.c please ? (before the batch of #include). =20 >=20 Yes, it is below. I saw the #define DEBUG 1 turned on these messages below, but I am not sure how to verify that I correctly added the=20 "debug" to the kernel arguments. (In u-boot I added them to the end of the ramargs variable) thanks, - ame # dmesg Linux version 2.6.27-01160-gc08fd34-dirty (mfg@lablinux) (gcc version = 4.2.2) #11 Fri Oct 17 09:32:16 CDT 2008 Found initrd at 0xc6cd5000:0xc6fffbc7 Found legacy serial port 0 for /plb/opb/serial@ef600300 mem=3D4ef600300, taddr=3D4ef600300, irq=3D0, clk=3D7407407, speed=3D0 Found legacy serial port 1 for /plb/opb/serial@ef600400 mem=3D4ef600400, taddr=3D4ef600400, irq=3D0, clk=3D7407407, speed=3D0 Found legacy serial port 2 for /plb/opb/serial@ef600500 mem=3D4ef600500, taddr=3D4ef600500, irq=3D0, clk=3D7407407, speed=3D0 Found legacy serial port 3 for /plb/opb/serial@ef600600 mem=3D4ef600600, taddr=3D4ef600600, irq=3D0, clk=3D7407407, speed=3D0 Top of RAM: 0x20000000, Total RAM: 0x20000000 Memory hole size: 0MB Zone PFN ranges: DMA 0x00000000 -> 0x00020000 Normal 0x00020000 -> 0x00020000 HighMem 0x00020000 -> 0x00020000 Movable zone start PFN for each node early_node_map[1] active PFN ranges 0: 0x00000000 -> 0x00020000 On node 0 totalpages: 131072 free_area_init_node: node 0, pgdat c0344a78, node_mem_map c0372000 DMA zone: 130048 pages, LIFO batch:31 Built 1 zonelists in Zone order, mobility grouping on. Total pages: = 130048 Kernel command line: ramdisk_size=3D65536 root=3D/dev/ram rw debug = ip=3D169.254.0.102: 169.254.0.100:169.254.0.100:255.255.255.0:tanosx:eth0:off panic=3D1 = console=3DttyS0, 115200 UIC0 (32 IRQ sources) at DCR 0xc0 UIC1 (32 IRQ sources) at DCR 0xd0 UIC2 (32 IRQ sources) at DCR 0xe0 UIC3 (32 IRQ sources) at DCR 0xf0 PID hash table entries: 2048 (order: 11, 8192 bytes) time_init: decrementer frequency =3D 800.000010 MHz time_init: processor frequency =3D 800.000010 MHz clocksource: timebase mult[500000] shift[22] registered clockevent: decrementer mult[cccc] shift[16] cpu[0] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) High memory: 0k Memory: 512640k/524288k available (3228k kernel code, 11320k reserved, = 124k data , 138k bss, 160k init) SLUB: Genslabs=3D10, HWalign=3D32, Order=3D0-3, MinObjects=3D0, = CPUs=3D1, Nodes=3D1 Calibrating delay loop... 1597.44 BogoMIPS (lpj=3D3194880) Mount-cache hash table entries: 512 net_namespace: 288 bytes NET: Registered protocol family 16 256k L2-cache enabled PCIE0: Checking link... PCIE0: No device detected. PCI host bridge /plb/pciex@d00000000 (primary) ranges: MEM 0x0000000e00000000..0x0000000e7fffffff -> 0x0000000080000000 IO 0x0000000f80000000..0x0000000f8000ffff -> 0x0000000000000000 4xx PCI DMA offset set to 0x00000000 PCIE0: successfully set as endpoint PCIE1: Checking link... PCIE1: Device detected, waiting for link... PCIE1: link is up ! PCI host bridge /plb/pciex@d20000000 (primary) ranges: MEM 0x0000000e80000000..0x0000000effffffff -> 0x0000000080000000 IO 0x0000000f80010000..0x0000000f8001ffff -> 0x0000000000000000 4xx PCI DMA offset set to 0x00000000 PCIE1: successfully set as root-complex PCI host bridge /plb/pci@c0ec00000 (primary) ranges: MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000 IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000 4xx PCI DMA offset set to 0x00000000 PCI: Probing PCI hardware PCI: Scanning bus 0000:40 pci 0000:40:00.0: found [eee0/fed0] class 000b20 header type 00 PCI: 0000:40:00.0 reg 10 64bit mmio: [0, 1ffffff] PCI: Hiding 4xx host bridge resources 0000:40:00.0 PCI: Fixups for bus 0000:40 PCI: Bus scan for 0000:40 returning with max=3D40 PCI: Scanning bus 0001:80 pci 0001:80:00.0: found [aaa1/bed1] class 000604 header type 01 PCI: 0001:80:00.0 reg 10 32bit mmio: [0, 7fffffff] PCI: Hiding 4xx host bridge resources 0001:80:00.0 PCI: Fixups for bus 0001:80 pci 0001:80:00.0: scanning behind bridge, config bf8180, pass 0 PCI: Scanning bus 0001:81 pci 0001:81:00.0: found [10b5/8509] class 000604 header type 01 PCI: 0001:81:00.0 reg 10 32bit mmio: [b8000000, b801ffff] pci 0001:81:00.0: PME# supported from D0 D3hot D3cold pci 0001:81:00.0: PME# disabled PCI: Fixups for bus 0001:81 PCI: bridge 0001:80:00.0 io port: [0, fff] PCI: bridge 0001:80:00.0 32bit mmio: [b8000000, b81fffff] pci 0001:81:00.0: scanning behind bridge, config 060201, pass 0 PCI: Scanning bus 0001:02 pci 0001:02:00.0: found [8201/3e00] class 0091ed header type 48 pci 0001:02:00.0: unknown header type 48, ignoring device pci 0001:02:01.0: found [2822/c78a] class 008846 header type 11 pci 0001:02:01.0: unknown header type 11, ignoring device pci 0001:02:02.0: found [8201/3e00] class 0091ed header type 48 pci 0001:02:02.0: unknown header type 48, ignoring device pci 0001:02:03.0: found [2822/c78a] class 008846 header type 51 pci 0001:02:03.0: unknown header type 51, ignoring device pci 0001:02:04.0: found [8201/3e08] class 0091ed header type 48 pci 0001:02:04.0: unknown header type 48, ignoring device pci 0001:02:05.0: found [2822/c78a] class 008846 header type 51 pci 0001:02:05.0: unknown header type 51, ignoring device pci 0001:02:06.0: found [8201/3e00] class 0091ed header type 48 pci 0001:02:06.0: unknown header type 48, ignoring device pci 0001:02:07.0: found [2822/c78a] class 008846 header type 51 pci 0001:02:07.0: unknown header type 51, ignoring device pci 0001:02:08.0: found [8201/3e08] class 0091ed header type 48 pci 0001:02:08.0: unknown header type 48, ignoring device pci 0001:02:09.0: found [2822/c78a] class 008842 header type 51 pci 0001:02:09.0: unknown header type 51, ignoring device pci 0001:02:0a.0: found [8201/3e08] class 0091ed header type 48 pci 0001:02:0a.0: unknown header type 48, ignoring device pci 0001:02:0b.0: found [2822/c78a] class 008846 header type 51 pci 0001:02:0b.0: unknown header type 51, ignoring device pci 0001:02:0c.0: found [8201/3e08] class 0091ed header type 48 pci 0001:02:0c.0: unknown header type 48, ignoring device pci 0001:02:0d.0: found [2822/c78a] class 008846 header type 51 pci 0001:02:0d.0: unknown header type 51, ignoring device pci 0001:02:0e.0: found [8201/3e00] class 0091ed header type 48 pci 0001:02:0e.0: unknown header type 48, ignoring device pci 0001:02:0f.0: found [2822/c78a] class 008846 header type 51 pci 0001:02:0f.0: unknown header type 51, ignoring device pci 0001:02:10.0: found [8201/3e08] class 0091ed header type 48 pci 0001:02:10.0: unknown header type 48, ignoring device pci 0001:02:11.0: found [2822/c78a] class 008846 header type 51 pci 0001:02:11.0: unknown header type 51, ignoring device pci 0001:02:12.0: found [8201/3e08] class 0091ed header type 48 pci 0001:02:12.0: unknown header type 48, ignoring device pci 0001:02:13.0: found [2822/c78a] class 008846 header type 51 pci 0001:02:13.0: unknown header type 51, ignoring device pci 0001:02:14.0: found [8201/3e08] class 0091ed header type 48 pci 0001:02:14.0: unknown header type 48, ignoring device pci 0001:02:15.0: found [2822/c78a] class 008846 header type 51 pci 0001:02:15.0: unknown header type 51, ignoring device pci 0001:02:16.0: found [8201/3e08] class 0091ed header type 48 pci 0001:02:16.0: unknown header type 48, ignoring device pci 0001:02:17.0: found [2822/c78a] class 008846 header type 51 pci 0001:02:17.0: unknown header type 51, ignoring device pci 0001:02:18.0: found [8201/3e00] class 0091ed header type 48 pci 0001:02:18.0: unknown header type 48, ignoring device pci 0001:02:19.0: found [2822/c78a] class 008842 header type 51 pci 0001:02:19.0: unknown header type 51, ignoring device pci 0001:02:1a.0: found [8201/3e00] class 0091ed header type 48 pci 0001:02:1a.0: unknown header type 48, ignoring device pci 0001:02:1b.0: found [2822/c78a] class 008846 header type 11 pci 0001:02:1b.0: unknown header type 11, ignoring device pci 0001:02:1c.0: found [8201/3e08] class 0099ed header type 48 pci 0001:02:1c.0: unknown header type 48, ignoring device pci 0001:02:1d.0: found [2822/c78a] class 008846 header type 11 pci 0001:02:1d.0: unknown header type 11, ignoring device pci 0001:02:1e.0: found [8201/3e08] class 0091ed header type 48 pci 0001:02:1e.0: unknown header type 48, ignoring device pci 0001:02:1f.0: found [2822/c78a] class 008846 header type 11 pci 0001:02:1f.0: unknown header type 11, ignoring device PCI: Fixups for bus 0001:02 PCI: bridge 0001:81:00.0 32bit mmio: [b8100000, b81fffff] PCI: Bus scan for 0001:02 returning with max=3D02 PCI: Bus #02 (-#06) is partially hidden behind bridge #81 (-#bf) pci 0001:81:00.0: scanning behind bridge, config 060201, pass 1 PCI: Bus scan for 0001:81 returning with max=3D81 pci 0001:80:00.0: scanning behind bridge, config bf8180, pass 1 PCI: Bus scan for 0001:80 returning with max=3Dbf PCI: Scanning bus 0002:00 PCI: Fixups for bus 0002:00 PCI: Bus scan for 0002:00 returning with max=3D00 pci 0001:81:00.0: PCI bridge, secondary bus 0001:02 pci 0001:81:00.0: IO window: disabled pci 0001:81:00.0: MEM window: disabled pci 0001:81:00.0: PREFETCH window: disabled pci 0001:80:00.0: PCI bridge, secondary bus 0001:81 pci 0001:80:00.0: IO window: disabled pci 0001:80:00.0: MEM window: 0x80000000-0x800fffff pci 0001:80:00.0: PREFETCH window: disabled bus: 40 index 0 io port: [fffc0000, fffcffff] bus: 40 index 1 mmio: [e00000000, e7fffffff] bus: 80 index 0 io port: [fffe0000, fffeffff] bus: 80 index 1 mmio: [e80000000, effffffff] bus: 81 index 0 mmio: [fffe0000, fffe0fff] bus: 81 index 1 mmio: [e80000000, e800fffff] bus: 81 index 2 mmio: [0, 0] bus: 81 index 3 mmio: [0, 0] bus: 02 index 0 mmio: [0, 0] bus: 02 index 1 mmio: [eb8100000, eb81fffff] bus: 02 index 2 mmio: [0, 0] bus: 02 index 3 mmio: [0, 0] bus: 00 index 0 io port: [0, ffff] bus: 00 index 1 mmio: [d80000000, dffffffff] SCSI subsystem initialized libata version 3.00 loaded. usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb NET: Registered protocol family 2 Switched to high resolution mode on CPU 0 IP route cache hash table entries: 16384 (order: 4, 65536 bytes) TCP established hash table entries: 65536 (order: 7, 524288 bytes) TCP bind hash table entries: 65536 (order: 6, 262144 bytes) TCP: Hash tables configured (established 65536 bind 65536) TCP reno registered NET: Registered protocol family 1 checking if image is initramfs...it isn't (no cpio magic); looks like an = initrd Freeing initrd memory: 3242k freed SATA port disabled via device-tree JFFS2 version 2.2. (NAND) =C2=A9 2001-2006 Red Hat, Inc. msgmni has been set to 1008 io scheduler noop registered io scheduler anticipatory registered (default) io scheduler deadline registered io scheduler cfq registered pcieport-driver 0001:80:00.0: found MSI capability pci_express 0001:80:00.0:pcie00: allocate port service pci_express 0001:80:00.0:pcie01: allocate port service pcieport-driver 0001:81:00.0: found MSI capability aer 0001:80:00.0:pcie01: request IRQ failed aer: probe of 0001:80:00.0:pcie01 failed with error -38 pci_hotplug: PCI Hot Plug PCI Core version: 0.5 pciehp: PCI Express Hot Plug Controller Driver version: 0.4 fakephp: Fake PCI Hot Plug Controller Driver Serial: 8250/16550 driver4 ports, IRQ sharing enabled serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq =3D 19) is a 16550A console [ttyS0] enabled serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq =3D 20) is a 16550A serial8250.0: ttyS2 at MMIO 0x4ef600500 (irq =3D 29) is a 16550A serial8250.0: ttyS3 at MMIO 0x4ef600600 (irq =3D 21) is a 16550A 4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq =3D 19) is a 16550A 4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq =3D 20) is a 16550A 4ef600500.serial: ttyS2 at MMIO 0x4ef600500 (irq =3D 29) is a 16550A 4ef600600.serial: ttyS3 at MMIO 0x4ef600600 (irq =3D 21) is a 16550A brd: module loaded PPC 4xx OCP EMAC driver, version 3.54 MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels ZMII /plb/opb/emac-zmii@ef600d00 initialized RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support TAH /plb/opb/emac-tah@ef601350 initialized TAH /plb/opb/emac-tah@ef601450 initialized /plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:10:ec:01:02:b9 eth0: found Generic MII PHY (0x00) /plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode eth1: EMAC-1 /plb/opb/ethernet@ef600f00, MAC 00:10:ec:81:02:b9 eth1: found Generic MII PHY (0x01) Driver 'sd' needs updating - please use bus_type methods 4cc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank Amd/Fujitsu Extended Query Table at 0x0040 4cc000000.nor_flash: CFI does not contain boot bank location. Assuming = top. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. RedBoot partition parsing not available Creating 7 MTD partitions on "4cc000000.nor_flash": 0x00000000-0x001e0000 : "kernel" 0x001e0000-0x00200000 : "dtb" 0x00200000-0x01600000 : "ramdisk" 0x01600000-0x01a00000 : "jffs2" 0x01a00000-0x03f60000 : "user" 0x03f60000-0x03fa0000 : "env" 0x03fa0000-0x04000000 : "u-boot" NDFC NAND Driver initialized. Chip-Rev: 0x00000111 NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB = 3,3V 8-b it) Scanning device for bad blocks Bad eraseblock 764 at 0x05f80000 Number of partitions 3 Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit": 0x00000000-0x00100000 : "u-boot" 0x00100000-0x00140000 : "env" 0x00140000-0x08000000 : "content" ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver ppc-of-ohci 4bffd0000.usb: OF OHCI ppc-of-ohci 4bffd0000.usb: new USB bus registered, assigned bus number 1 ppc-of-ohci 4bffd0000.usb: irq 37, io mem 0x4bffd0000 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected usb usb1: New USB device found, idVendor=3D1d6b, idProduct=3D0001 usb usb1: New USB device strings: Mfr=3D3, Product=3D2, SerialNumber=3D1 usb usb1: Product: OF OHCI usb usb1: Manufacturer: Linux 2.6.27-01160-gc08fd34-dirty ohci_hcd usb usb1: SerialNumber: PPC-OF USB Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. dwc_otg: version 2.60a 22-NOV-2006 dwc_otg: Shared Tx FIFO mode dwc_otg: Using Slave mode dwc_otg dwc_otg.0: DWC OTG Controller dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 2 dwc_otg dwc_otg.0: irq 28, io mem 0x00000000 dwc_otg: dwc_otg_core_host_init: Unable to clear halt on channel 1 dwc_otg: Init: Port Power? op_state=3D4 usb usb2: configuration #1 chosen from 1 choice hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected usb usb2: New USB device found, idVendor=3D1d6b, idProduct=3D0002 usb usb2: New USB device strings: Mfr=3D3, Product=3D2, SerialNumber=3D1 usb usb2: Product: DWC OTG Controller usb usb2: Manufacturer: Linux 2.6.27-01160-gc08fd34-dirty dwc_otg_hcd usb usb2: SerialNumber: dwc_otg.0 i2c /dev entries driver ibm-iic 4ef600700.i2c: clckdiv =3D 9 rtc-m41t80 0-0068: chip found, driver version 0.05 rtc-m41t80 0-0068: rtc core: registered m41t80 as rtc0 ibm-iic 4ef600700.i2c: using standard (100 kHz) mode ibm-iic 4ef600800.i2c: clckdiv =3D 9 ibm-iic 4ef600800.i2c: using standard (100 kHz) mode 24c01a EEPROM driver initialized TCP cubic registered NET: Registered protocol family 17 RPC: Registered udp transport module. RPC: Registered tcp transport module. rtc-m41t80 0-0068: setting system clock to 2008-10-17 11:03:37 UTC = (1224241417) eth0: link is up, 100 FDX, pause enabled IP-Config: Complete: device=3Deth0, addr=3D169.254.0.102, mask=3D255.255.255.0, = gw=3D169.254.0.100, host=3Dtanosx, domain=3D, nis-domain=3D(none), bootserver=3D169.254.0.100, rootserver=3D169.254.0.100, rootpath=3D RAMDISK: Compressed image found at block 0 VFS: Mounted root (ext2 filesystem). Freeing unused kernel memory: 160k init ^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: Problems with PCI-E devices not being detected with switch 2008-10-17 14:54 ` Ayman El-Khashab @ 2008-10-17 21:05 ` Benjamin Herrenschmidt 2008-10-17 21:19 ` Benjamin Herrenschmidt 1 sibling, 0 replies; 17+ messages in thread From: Benjamin Herrenschmidt @ 2008-10-17 21:05 UTC (permalink / raw) To: Ayman El-Khashab; +Cc: linuxppc-dev On Fri, 2008-10-17 at 09:54 -0500, Ayman El-Khashab wrote: > Benjamin Herrenschmidt wrote: > > On Thu, 2008-10-16 at 10:01 -0500, Ayman El-Khashab wrote: > >> Benjamin Herrenschmidt wrote: > >>> On Wed, 2008-10-15 at 10:47 -0500, Ayman El-Khashab wrote: > >>> > >>> Note for people on CC: This is a problem on 460EX on a canyonland > >>> using the 4x port. > >>> > > > > Ok, can you send me a full dmesg log with "debug" on the kernel > > command line after adding a #define DEBUG 1 to the top of > > drivers/pci/probe.c please ? (before the batch of #include). > > > > Yes, it is below. I saw the #define DEBUG 1 turned on these messages > below, but I am not sure how to verify that I correctly added the > "debug" to the kernel arguments. (In u-boot I added them to the end > of the ramargs variable) It's ok. "debug" just makes those messages visible on the boot console, 'dmesg' always shows it all. Ben. ^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: Problems with PCI-E devices not being detected with switch 2008-10-17 14:54 ` Ayman El-Khashab 2008-10-17 21:05 ` Benjamin Herrenschmidt @ 2008-10-17 21:19 ` Benjamin Herrenschmidt 2008-10-20 21:03 ` Ayman El-Khashab 1 sibling, 1 reply; 17+ messages in thread From: Benjamin Herrenschmidt @ 2008-10-17 21:19 UTC (permalink / raw) To: Ayman El-Khashab; +Cc: linuxppc-dev On Fri, 2008-10-17 at 09:54 -0500, Ayman El-Khashab wrote: > Benjamin Herrenschmidt wrote: > > On Thu, 2008-10-16 at 10:01 -0500, Ayman El-Khashab wrote: > >> Benjamin Herrenschmidt wrote: > >>> On Wed, 2008-10-15 at 10:47 -0500, Ayman El-Khashab wrote: > >>> > >>> Note for people on CC: This is a problem on 460EX on a canyonland > >>> using the 4x port. > >>> > > > > Ok, can you send me a full dmesg log with "debug" on the kernel > > command line after adding a #define DEBUG 1 to the top of > > drivers/pci/probe.c please ? (before the batch of #include). > > > > Yes, it is below. I saw the #define DEBUG 1 turned on these messages > below, but I am not sure how to verify that I correctly added the > "debug" to the kernel arguments. (In u-boot I added them to the end > of the ramargs variable) Can you try this (untested) patch and send me the resulting dmesg log (along with whether it helps). I think I know what the problem is. This isn't the "proper" solution that should be implemented but it might help with the generic code detecting that something is wrong and fixing it up. I'll look at doing something better next week. The problem I -think- is the bus numbers in the switch don't get reset by the PCI-E reset below the root complex. Thus when the kernel probes, it finds non sensical numbers in there that don't fit the range assigned to the parent bus. We can force the kernel to renumber everything with a flag but that will cause problems with the root complex on 4xx due to other considerations (that we need to fix too, mainly the way we limit config space to a subset of bus numbers, we need to switch to dynamic fixmap for config space to solve that). If my theory is correct, this patch should help the kernel detect that something is wrong on the switch and reconfigure it. Cheers, Ben. Index: linux-work/drivers/pci/probe.c =================================================================== --- linux-work.orig/drivers/pci/probe.c 2008-10-18 08:10:25.000000000 +1100 +++ linux-work/drivers/pci/probe.c 2008-10-18 08:14:14.000000000 +1100 @@ -536,19 +536,27 @@ int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS); u32 buses, i, j = 0; u16 bctl; + int broken = 0; pci_read_config_dword(dev, PCI_PRIMARY_BUS, &buses); dev_dbg(&dev->dev, "scanning behind bridge, config %06x, pass %d\n", buses & 0xffffff, pass); + /* Check if setup is sensible at all */ + if ((buses & 0xff) != bus->number || + ((buses >> 8) & 0xff) != <= bus->number) { + dev_dbg(&dev->dev, "bus configuration doesn't match, reconfiguring\n"); + broken = 1; + } + /* Disable MasterAbortMode during probing to avoid reporting of bus errors (in some architectures) */ pci_read_config_word(dev, PCI_BRIDGE_CONTROL, &bctl); pci_write_config_word(dev, PCI_BRIDGE_CONTROL, bctl & ~PCI_BRIDGE_CTL_MASTER_ABORT); - if ((buses & 0xffff00) && !pcibios_assign_all_busses() && !is_cardbus) { + if ((buses & 0xffff00) && !pcibios_assign_all_busses() && !is_cardbus && !broken) { unsigned int cmax, busnr; /* * Bus already configured by firmware, process it in the first @@ -586,7 +594,7 @@ * do in the second pass. */ if (!pass) { - if (pcibios_assign_all_busses()) + if (pcibios_assign_all_busses() || broken) /* Temporarily disable forwarding of the configuration cycles on all bridges in this bus segment to avoid possible ^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: Problems with PCI-E devices not being detected with switch 2008-10-17 21:19 ` Benjamin Herrenschmidt @ 2008-10-20 21:03 ` Ayman El-Khashab 2008-10-20 21:57 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 17+ messages in thread From: Ayman El-Khashab @ 2008-10-20 21:03 UTC (permalink / raw) To: linuxppc-dev Thank you Ben, I've had success with the patch, details below ... Benjamin Herrenschmidt wrote: > Can you try this (untested) patch and send me the resulting dmesg log > (along with whether it helps).=20 >=20 > Index: linux-work/drivers/pci/probe.c > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- linux-work.orig/drivers/pci/probe.c 2008-10-18 08:10:25.000000000 > +1100 +++ linux-work/drivers/pci/probe.c 2008-10-18 > 08:14:14.000000000 +1100 @@ -536,19 +536,27 @@ > int is_cardbus =3D (dev->hdr_type =3D=3D PCI_HEADER_TYPE_CARDBUS); > u32 buses, i, j =3D 0; > u16 bctl; > + int broken =3D 0; >=20 > pci_read_config_dword(dev, PCI_PRIMARY_BUS, &buses); >=20 > dev_dbg(&dev->dev, "scanning behind bridge, config %06x, pass %d\n", > buses & 0xffffff, pass); >=20 > + /* Check if setup is sensible at all */ > + if ((buses & 0xff) !=3D bus->number || > + ((buses >> 8) & 0xff) !=3D <=3D bus->number) { Note that I removed the <=3D from the above line -- I did not think it = was=20 correct. Please let me know if that was wrong. <snipped rest of patch> Attached below is the dmesg output, in this case the SIL on the = downstream switch port was detected correctly. Advise if there is something else = that needs to be tried. Thanks Ayman Kernel command line: ramdisk_size=3D65536 root=3D/dev/ram rw = ip=3D169.254.0.199:169.20 UIC0 (32 IRQ sources) at DCR 0xc0 UIC1 (32 IRQ sources) at DCR 0xd0 UIC2 (32 IRQ sources) at DCR 0xe0 UIC3 (32 IRQ sources) at DCR 0xf0 PID hash table entries: 2048 (order: 11, 8192 bytes) time_init: decrementer frequency =3D 800.000010 MHz time_init: processor frequency =3D 800.000010 MHz clocksource: timebase mult[500000] shift[22] registered clockevent: decrementer mult[cccc] shift[16] cpu[0] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) High memory: 0k Memory: 512640k/524288k available (3244k kernel code, 11336k reserved, = 124k dat) SLUB: Genslabs=3D10, HWalign=3D32, Order=3D0-3, MinObjects=3D0, = CPUs=3D1, Nodes=3D1 Calibrating delay loop... 1597.44 BogoMIPS (lpj=3D3194880) Mount-cache hash table entries: 512 net_namespace: 288 bytes NET: Registered protocol family 16 256k L2-cache enabled PCIE0: Checking link... PCIE0: No device detected. PCI host bridge /plb/pciex@d00000000 (primary) ranges: MEM 0x0000000e00000000..0x0000000e7fffffff -> 0x0000000080000000 IO 0x0000000f80000000..0x0000000f8000ffff -> 0x0000000000000000 4xx PCI DMA offset set to 0x00000000 PCIE0: successfully set as endpoint PCIE1: Checking link... PCIE1: Device detected, waiting for link... PCIE1: link is up ! PCI host bridge /plb/pciex@d20000000 (primary) ranges: MEM 0x0000000e80000000..0x0000000effffffff -> 0x0000000080000000 IO 0x0000000f80010000..0x0000000f8001ffff -> 0x0000000000000000 4xx PCI DMA offset set to 0x00000000 PCIE1: successfully set as root-complex PCI host bridge /plb/pci@c0ec00000 (primary) ranges: MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000 IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000 4xx PCI DMA offset set to 0x00000000 PCI: Probing PCI hardware PCI: Scanning bus 0000:40 pci 0000:40:00.0: found [eee0/fed0] class 000b20 header type 00 PCI: 0000:40:00.0 reg 10 64bit mmio: [0, 1ffffff] PCI: Hiding 4xx host bridge resources 0000:40:00.0 PCI: Fixups for bus 0000:40 PCI: Bus scan for 0000:40 returning with max=3D40 PCI: Scanning bus 0001:80 pci 0001:80:00.0: found [aaa1/bed1] class 000604 header type 01 PCI: 0001:80:00.0 reg 10 32bit mmio: [0, 7fffffff] PCI: Hiding 4xx host bridge resources 0001:80:00.0 PCI: Fixups for bus 0001:80 pci 0001:80:00.0: scanning behind bridge, config bf8180, pass 0 pci 0001:80:00.0: bus configuration doesn't match, reconfiguring pci 0001:80:00.0: scanning behind bridge, config 000000, pass 1 pci 0001:80:00.0: bus configuration doesn't match, reconfiguring PCI: Scanning bus 0001:81 pci 0001:81:00.0: found [10b5/8509] class 000604 header type 01 PCI: 0001:81:00.0 reg 10 32bit mmio: [b8000000, b801ffff] pci 0001:81:00.0: PME# supported from D0 D3hot D3cold pci 0001:81:00.0: PME# disabled PCI: Fixups for bus 0001:81 PCI: bridge 0001:80:00.0 io port: [0, fff] PCI: bridge 0001:80:00.0 32bit mmio: [b8000000, b81fffff] pci 0001:81:00.0: scanning behind bridge, config 060201, pass 0 pci 0001:81:00.0: bus configuration doesn't match, reconfiguring pci 0001:81:00.0: scanning behind bridge, config 000000, pass 1 pci 0001:81:00.0: bus configuration doesn't match, reconfiguring PCI: Scanning bus 0001:82 pci 0001:82:01.0: found [10b5/8509] class 000604 header type 01 pci 0001:82:01.0: PME# supported from D0 D3hot D3cold pci 0001:82:01.0: PME# disabled pci 0001:82:02.0: found [10b5/8509] class 000604 header type 01 pci 0001:82:02.0: PME# supported from D0 D3hot D3cold pci 0001:82:02.0: PME# disabled pci 0001:82:03.0: found [10b5/8509] class 000604 header type 01 pci 0001:82:03.0: PME# supported from D0 D3hot D3cold pci 0001:82:03.0: PME# disabled pci 0001:82:04.0: found [10b5/8509] class 000604 header type 01 pci 0001:82:04.0: PME# supported from D0 D3hot D3cold pci 0001:82:04.0: PME# disabled PCI: Fixups for bus 0001:82 PCI: bridge 0001:81:00.0 32bit mmio: [b8100000, b81fffff] pci 0001:82:01.0: scanning behind bridge, config 030302, pass 0 pci 0001:82:01.0: bus configuration doesn't match, reconfiguring pci 0001:82:02.0: scanning behind bridge, config 040402, pass 0 pci 0001:82:02.0: bus configuration doesn't match, reconfiguring pci 0001:82:03.0: scanning behind bridge, config 050502, pass 0 pci 0001:82:03.0: bus configuration doesn't match, reconfiguring pci 0001:82:04.0: scanning behind bridge, config 060602, pass 0 pci 0001:82:04.0: bus configuration doesn't match, reconfiguring pci 0001:82:01.0: scanning behind bridge, config 000000, pass 1 pci 0001:82:01.0: bus configuration doesn't match, reconfiguring PCI: Scanning bus 0001:83 PCI: Fixups for bus 0001:83 PCI: Bus scan for 0001:83 returning with max=3D83 pci 0001:82:02.0: scanning behind bridge, config 000000, pass 1 pci 0001:82:02.0: bus configuration doesn't match, reconfiguring PCI: Scanning bus 0001:84 PCI: Fixups for bus 0001:84 PCI: Bus scan for 0001:84 returning with max=3D84 pci 0001:82:03.0: scanning behind bridge, config 000000, pass 1 pci 0001:82:03.0: bus configuration doesn't match, reconfiguring PCI: Scanning bus 0001:85 pci 0001:85:00.0: found [1095/3531] class 000180 header type 00 PCI: 0001:85:00.0 reg 10 64bit mmio: [b8100000, b810007f] PCI: 0001:85:00.0 reg 18 64bit mmio: [b8102000, b8103fff] PCI: 0001:85:00.0 reg 20 io port: [ffffff80, ffffffff] pci 0001:85:00.0: supports D1 pci 0001:85:00.0: supports D2 PCI: Fixups for bus 0001:85 PCI: bridge 0001:82:03.0 32bit mmio: [b8100000, b81fffff] PCI: Bus scan for 0001:85 returning with max=3D85 pci 0001:82:04.0: scanning behind bridge, config 000000, pass 1 pci 0001:82:04.0: bus configuration doesn't match, reconfiguring PCI: Scanning bus 0001:86 PCI: Fixups for bus 0001:86 PCI: Bus scan for 0001:86 returning with max=3D86 PCI: Bus scan for 0001:82 returning with max=3D86 PCI: Bus scan for 0001:81 returning with max=3D86 PCI: Bus scan for 0001:80 returning with max=3D86 PCI: Scanning bus 0002:00 PCI: Fixups for bus 0002:00 PCI: Bus scan for 0002:00 returning with max=3D00 pci 0001:82:01.0: PCI bridge, secondary bus 0001:83 pci 0001:82:01.0: IO window: disabled pci 0001:82:01.0: MEM window: disabled pci 0001:82:01.0: PREFETCH window: disabled pci 0001:82:02.0: PCI bridge, secondary bus 0001:84 pci 0001:82:02.0: IO window: disabled pci 0001:82:02.0: MEM window: disabled pci 0001:82:02.0: PREFETCH window: disabled pci 0001:82:03.0: PCI bridge, secondary bus 0001:85 pci 0001:82:03.0: IO window: 0x00-0xfff pci 0001:82:03.0: MEM window: 0x80000000-0x800fffff pci 0001:82:03.0: PREFETCH window: disabled pci 0001:82:04.0: PCI bridge, secondary bus 0001:86 pci 0001:82:04.0: IO window: disabled pci 0001:82:04.0: MEM window: disabled pci 0001:82:04.0: PREFETCH window: disabled pci 0001:81:00.0: PCI bridge, secondary bus 0001:82 pci 0001:81:00.0: IO window: 0x00-0xfff pci 0001:81:00.0: MEM window: 0x80000000-0x800fffff pci 0001:81:00.0: PREFETCH window: disabled pci 0001:80:00.0: PCI bridge, secondary bus 0001:81 pci 0001:80:00.0: IO window: 0x00-0xfff pci 0001:80:00.0: MEM window: 0x80000000-0x801fffff pci 0001:80:00.0: PREFETCH window: disabled pci 0001:81:00.0: enabling device (0006 -> 0007) pci 0001:82:03.0: enabling device (0006 -> 0007) bus: 40 index 0 io port: [fffc0000, fffcffff] bus: 40 index 1 mmio: [e00000000, e7fffffff] bus: 80 index 0 io port: [fffe0000, fffeffff] bus: 80 index 1 mmio: [e80000000, effffffff] bus: 81 index 0 io port: [fffe0000, fffe0fff] bus: 81 index 1 mmio: [e80000000, e801fffff] bus: 81 index 2 mmio: [0, 0] bus: 81 index 3 mmio: [0, 0] bus: 82 index 0 io port: [fffe0000, fffe0fff] bus: 82 index 1 mmio: [e80000000, e800fffff] bus: 82 index 2 mmio: [0, 0] bus: 82 index 3 mmio: [0, 0] bus: 83 index 0 mmio: [0, 0] bus: 83 index 1 mmio: [0, 0] bus: 83 index 2 mmio: [0, 0] bus: 83 index 3 mmio: [0, 0] bus: 84 index 0 mmio: [0, 0] bus: 84 index 1 mmio: [0, 0] bus: 84 index 2 mmio: [0, 0] bus: 84 index 3 mmio: [0, 0] bus: 85 index 0 io port: [fffe0000, fffe0fff] bus: 85 index 1 mmio: [e80000000, e800fffff] bus: 85 index 2 mmio: [0, 0] bus: 85 index 3 mmio: [0, 0] bus: 86 index 0 mmio: [0, 0] bus: 86 index 1 mmio: [0, 0] bus: 86 index 2 mmio: [0, 0] bus: 86 index 3 mmio: [0, 0] bus: 00 index 0 io port: [0, ffff] bus: 00 index 1 mmio: [d80000000, dffffffff] SCSI subsystem initialized libata version 3.00 loaded. usbcore: registered new interface driver usbfs usbcore: registered new interface driver hub usbcore: registered new device driver usb NET: Registered protocol family 2 Switched to high resolution mode on CPU 0 IP route cache hash table entries: 16384 (order: 4, 65536 bytes) TCP established hash table entries: 65536 (order: 7, 524288 bytes) TCP bind hash table entries: 65536 (order: 6, 262144 bytes) TCP: Hash tables configured (established 65536 bind 65536) TCP reno registered NET: Registered protocol family 1 checking if image is initramfs...it isn't (no cpio magic); looks like an = initrd Freeing initrd memory: 3242k freed SATA port disabled via device-tree JFFS2 version 2.2. (NAND) =C2=A9 2001-2006 Red Hat, Inc. msgmni has been set to 1008 io scheduler noop registered io scheduler anticipatory registered (default) io scheduler deadline registered io scheduler cfq registered pcieport-driver 0001:80:00.0: found MSI capability pci_express 0001:80:00.0:pcie00: allocate port service pci_express 0001:80:00.0:pcie01: allocate port service pcieport-driver 0001:81:00.0: found MSI capability pcieport-driver 0001:82:01.0: found MSI capability pci_express 0001:82:01.0:pcie22: allocate port service pcieport-driver 0001:82:02.0: found MSI capability pci_express 0001:82:02.0:pcie22: allocate port service pcieport-driver 0001:82:03.0: found MSI capability pci_express 0001:82:03.0:pcie22: allocate port service pcieport-driver 0001:82:04.0: found MSI capability aer 0001:80:00.0:pcie01: request IRQ failed aer: probe of 0001:80:00.0:pcie01 failed with error -38 pci_hotplug: PCI Hot Plug PCI Core version: 0.5 pciehp: HPC vendor_id 10b5 device_id 8509 ss_vid 0 ss_did 0 hpdriver 0001:82:01.0:pcie22: service driver hpdriver loaded pciehp: HPC vendor_id 10b5 device_id 8509 ss_vid 0 ss_did 0 hpdriver 0001:82:02.0:pcie22: service driver hpdriver loaded pciehp: HPC vendor_id 10b5 device_id 8509 ss_vid 0 ss_did 0 hpdriver 0001:82:03.0:pcie22: service driver hpdriver loaded pciehp: PCI Express Hot Plug Controller Driver version: 0.4 fakephp: Fake PCI Hot Plug Controller Driver fakephp: pci_hp_register failed with error -16 Serial: 8250/16550 driver4 ports, IRQ sharing enabled serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq =3D 22) is a 16550A console [ttyS0] enabled serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq =3D 24) is a 16550A serial8250.0: ttyS2 at MMIO 0x4ef600500 (irq =3D 29) is a 16550A serial8250.0: ttyS3 at MMIO 0x4ef600600 (irq =3D 25) is a 16550A 4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq =3D 22) is a 16550A 4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq =3D 24) is a 16550A 4ef600500.serial: ttyS2 at MMIO 0x4ef600500 (irq =3D 29) is a 16550A 4ef600600.serial: ttyS3 at MMIO 0x4ef600600 (irq =3D 25) is a 16550A brd: module loaded PPC 4xx OCP EMAC driver, version 3.54 MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels ZMII /plb/opb/emac-zmii@ef600d00 initialized RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support TAH /plb/opb/emac-tah@ef601350 initialized TAH /plb/opb/emac-tah@ef601450 initialized /plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:10:ec:01:02:b9 eth0: found Generic MII PHY (0x00) /plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode eth1: EMAC-1 /plb/opb/ethernet@ef600f00, MAC 00:10:ec:81:02:b9 eth1: found Generic MII PHY (0x01) Driver 'sd' needs updating - please use bus_type methods sata_sil24 0001:85:00.0: version 1.1 sata_sil24 0001:85:00.0: enabling device (0006 -> 0007) scsi0 : sata_sil24 ata1: SATA max UDMA/100 host m128@0xe80002000 port 0xe80000000 irq 21 ata1: SATA link down (SStatus 0 SControl 0) 4cc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank Amd/Fujitsu Extended Query Table at 0x0040 4cc000000.nor_flash: CFI does not contain boot bank location. Assuming = top. number of CFI chips: 1 cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. RedBoot partition parsing not available Creating 7 MTD partitions on "4cc000000.nor_flash": 0x00000000-0x001e0000 : "kernel" 0x001e0000-0x00200000 : "dtb" 0x00200000-0x01600000 : "ramdisk" 0x01600000-0x01a00000 : "jffs2" 0x01a00000-0x03f60000 : "user" 0x03f60000-0x03fa0000 : "env" 0x03fa0000-0x04000000 : "u-boot" NDFC NAND Driver initialized. Chip-Rev: 0x00000111 NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB = 3,3V 8-) Scanning device for bad blocks Bad eraseblock 764 at 0x05f80000 Number of partitions 3 Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit": 0x00000000-0x00100000 : "u-boot" 0x00100000-0x00140000 : "env" 0x00140000-0x08000000 : "content" ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver ppc-of-ohci 4bffd0000.usb: OF OHCI ppc-of-ohci 4bffd0000.usb: new USB bus registered, assigned bus number 1 ppc-of-ohci 4bffd0000.usb: irq 40, io mem 0x4bffd0000 usb usb1: configuration #1 chosen from 1 choice hub 1-0:1.0: USB hub found hub 1-0:1.0: 1 port detected usb usb1: New USB device found, idVendor=3D1d6b, idProduct=3D0001 usb usb1: New USB device strings: Mfr=3D3, Product=3D2, SerialNumber=3D1 usb usb1: Product: OF OHCI usb usb1: Manufacturer: Linux 2.6.27-01160-gc08fd34-dirty ohci_hcd usb usb1: SerialNumber: PPC-OF USB Initializing USB Mass Storage driver... usbcore: registered new interface driver usb-storage USB Mass Storage support registered. dwc_otg: version 2.60a 22-NOV-2006 dwc_otg: Shared Tx FIFO mode dwc_otg: Using Slave mode dwc_otg dwc_otg.0: DWC OTG Controller dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 2 dwc_otg dwc_otg.0: irq 28, io mem 0x00000000 dwc_otg: dwc_otg_core_host_init: Unable to clear halt on channel 1 dwc_otg: Init: Port Power? op_state=3D4 usb usb2: configuration #1 chosen from 1 choice hub 2-0:1.0: USB hub found hub 2-0:1.0: 1 port detected usb usb2: New USB device found, idVendor=3D1d6b, idProduct=3D0002 usb usb2: New USB device strings: Mfr=3D3, Product=3D2, SerialNumber=3D1 usb usb2: Product: DWC OTG Controller usb usb2: Manufacturer: Linux 2.6.27-01160-gc08fd34-dirty dwc_otg_hcd usb usb2: SerialNumber: dwc_otg.0 i2c /dev entries driver ibm-iic 4ef600700.i2c: clckdiv =3D 9 rtc-m41t80 0-0068: chip found, driver version 0.05 rtc-m41t80 0-0068: rtc core: registered m41t80 as rtc0 ibm-iic 4ef600700.i2c: using standard (100 kHz) mode ibm-iic 4ef600800.i2c: clckdiv =3D 9 ibm-iic 4ef600800.i2c: using standard (100 kHz) mode 24c01a EEPROM driver initialized TCP cubic registered NET: Registered protocol family 17 RPC: Registered udp transport module. RPC: Registered tcp transport module. rtc-m41t80 0-0068: setting system clock to 2008-10-20 17:08:34 UTC = (1224522514) eth0: link is up, 100 FDX, pause enabled IP-Config: Complete: device=3Deth0, addr=3D169.254.0.199, mask=3D255.255.255.0, = gw=3D169.254.0.100, host=3Dtanosx, domain=3D, nis-domain=3D(none), bootserver=3D169.254.0.100, rootserver=3D169.254.0.100, rootpath=3D RAMDISK: Compressed image found at block 0 VFS: Mounted root (ext2 filesystem). Freeing unused kernel memory: 160k init # ^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: Problems with PCI-E devices not being detected with switch 2008-10-20 21:03 ` Ayman El-Khashab @ 2008-10-20 21:57 ` Benjamin Herrenschmidt 2008-10-20 22:14 ` Ayman El-Khashab 0 siblings, 1 reply; 17+ messages in thread From: Benjamin Herrenschmidt @ 2008-10-20 21:57 UTC (permalink / raw) To: Ayman El-Khashab; +Cc: linuxppc-dev On Mon, 2008-10-20 at 16:03 -0500, Ayman El-Khashab wrote: > Thank you Ben, I've had success with the patch, details below ... > > Benjamin Herrenschmidt wrote: > > > Can you try this (untested) patch and send me the resulting dmesg log > > (along with whether it helps). > > > > Index: linux-work/drivers/pci/probe.c > > =================================================================== > > --- linux-work.orig/drivers/pci/probe.c 2008-10-18 08:10:25.000000000 > > +1100 +++ linux-work/drivers/pci/probe.c 2008-10-18 > > 08:14:14.000000000 +1100 @@ -536,19 +536,27 @@ > > int is_cardbus = (dev->hdr_type == PCI_HEADER_TYPE_CARDBUS); > > u32 buses, i, j = 0; > > u16 bctl; > > + int broken = 0; > > > > pci_read_config_dword(dev, PCI_PRIMARY_BUS, &buses); > > > > dev_dbg(&dev->dev, "scanning behind bridge, config %06x, pass %d\n", > > buses & 0xffffff, pass); > > > > + /* Check if setup is sensible at all */ > > + if ((buses & 0xff) != bus->number || > > + ((buses >> 8) & 0xff) != <= bus->number) { > > Note that I removed the <= from the above line -- I did not think it was > correct. Please let me know if that was wrong. My logic is that the current setup is incorrect if the primary bus of the bridge doesn't match the parent bus number, or if the secondary bus number of the bridge is not strictly superior to the parent bus number. What sounds incorrect ? IE, if you have: PHB ..(A)...RC...(B)..(switch)...(C) IE, A is bus number of the root PHB, ie, primary bus number of root complex virtual bridge. B is secondary number of root complex virtual bridge, as such primary number of the switch. C is secondary number of the switch (ie, bus where you device will reside). I'm checking here that for the switch, PRIMARY == B and SECONDARY > B (And for the RC additionally that PRIMARY = A and SECONDARY > A) Which means that this "second" check basically enforces that A < B < C > <snipped rest of patch> > > Attached below is the dmesg output, in this case the SIL on the downstream > switch port was detected correctly. Advise if there is something else that > needs to be tried. There will be yes. The patch works, which confirm my analysis of the problem. I will probably send this patch upstream as it makes sense to improve the kernel robustness here, but we also probably need to add some sort of flag for the default behaviour on 4xx. I see two options here: - We can implement support in pci_4xx to do config space on the whole range of bus numbers instead of a subset, using the fixmap logic. That way, we no longer have limitations, we can ignore the bus ranges specified in the device-tree and just use the existing mechanism to re-assign all bus numbers. - We can add a header quirk in pci_4xx that clears out PRIMARY/SECONDARY/SUBORDINATE in all P2P bridges other than the Root Complex to force them to be re-assigned without having to hit the workaround. - We can implement some kind of ppc_pci_flag that trigger reconfiguration of all busses but _not_ of PHBs (ie would cause pcibios_assign_all_busses() to be 1 but wouldn't force assign numbers in pci_32.c for the root busses). I'm not 100% sure what the best approach is at this stage, any opinion ? Cheers, Ben. > Thanks > Ayman > > Kernel command line: ramdisk_size=65536 root=/dev/ram rw ip=169.254.0.199:169.20 > UIC0 (32 IRQ sources) at DCR 0xc0 > UIC1 (32 IRQ sources) at DCR 0xd0 > UIC2 (32 IRQ sources) at DCR 0xe0 > UIC3 (32 IRQ sources) at DCR 0xf0 > PID hash table entries: 2048 (order: 11, 8192 bytes) > time_init: decrementer frequency = 800.000010 MHz > time_init: processor frequency = 800.000010 MHz > clocksource: timebase mult[500000] shift[22] registered > clockevent: decrementer mult[cccc] shift[16] cpu[0] > Dentry cache hash table entries: 65536 (order: 6, 262144 bytes) > Inode-cache hash table entries: 32768 (order: 5, 131072 bytes) > High memory: 0k > Memory: 512640k/524288k available (3244k kernel code, 11336k reserved, 124k dat) > SLUB: Genslabs=10, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 > Calibrating delay loop... 1597.44 BogoMIPS (lpj=3194880) > Mount-cache hash table entries: 512 > net_namespace: 288 bytes > NET: Registered protocol family 16 > 256k L2-cache enabled > PCIE0: Checking link... > PCIE0: No device detected. > PCI host bridge /plb/pciex@d00000000 (primary) ranges: > MEM 0x0000000e00000000..0x0000000e7fffffff -> 0x0000000080000000 > IO 0x0000000f80000000..0x0000000f8000ffff -> 0x0000000000000000 > 4xx PCI DMA offset set to 0x00000000 > PCIE0: successfully set as endpoint > PCIE1: Checking link... > PCIE1: Device detected, waiting for link... > PCIE1: link is up ! > PCI host bridge /plb/pciex@d20000000 (primary) ranges: > MEM 0x0000000e80000000..0x0000000effffffff -> 0x0000000080000000 > IO 0x0000000f80010000..0x0000000f8001ffff -> 0x0000000000000000 > 4xx PCI DMA offset set to 0x00000000 > PCIE1: successfully set as root-complex > PCI host bridge /plb/pci@c0ec00000 (primary) ranges: > MEM 0x0000000d80000000..0x0000000dffffffff -> 0x0000000080000000 > IO 0x0000000c08000000..0x0000000c0800ffff -> 0x0000000000000000 > 4xx PCI DMA offset set to 0x00000000 > PCI: Probing PCI hardware > PCI: Scanning bus 0000:40 > pci 0000:40:00.0: found [eee0/fed0] class 000b20 header type 00 > PCI: 0000:40:00.0 reg 10 64bit mmio: [0, 1ffffff] > PCI: Hiding 4xx host bridge resources 0000:40:00.0 > PCI: Fixups for bus 0000:40 > PCI: Bus scan for 0000:40 returning with max=40 > PCI: Scanning bus 0001:80 > pci 0001:80:00.0: found [aaa1/bed1] class 000604 header type 01 > PCI: 0001:80:00.0 reg 10 32bit mmio: [0, 7fffffff] > PCI: Hiding 4xx host bridge resources 0001:80:00.0 > PCI: Fixups for bus 0001:80 > pci 0001:80:00.0: scanning behind bridge, config bf8180, pass 0 > pci 0001:80:00.0: bus configuration doesn't match, reconfiguring > pci 0001:80:00.0: scanning behind bridge, config 000000, pass 1 > pci 0001:80:00.0: bus configuration doesn't match, reconfiguring > PCI: Scanning bus 0001:81 > pci 0001:81:00.0: found [10b5/8509] class 000604 header type 01 > PCI: 0001:81:00.0 reg 10 32bit mmio: [b8000000, b801ffff] > pci 0001:81:00.0: PME# supported from D0 D3hot D3cold > pci 0001:81:00.0: PME# disabled > PCI: Fixups for bus 0001:81 > PCI: bridge 0001:80:00.0 io port: [0, fff] > PCI: bridge 0001:80:00.0 32bit mmio: [b8000000, b81fffff] > pci 0001:81:00.0: scanning behind bridge, config 060201, pass 0 > pci 0001:81:00.0: bus configuration doesn't match, reconfiguring > pci 0001:81:00.0: scanning behind bridge, config 000000, pass 1 > pci 0001:81:00.0: bus configuration doesn't match, reconfiguring > PCI: Scanning bus 0001:82 > pci 0001:82:01.0: found [10b5/8509] class 000604 header type 01 > pci 0001:82:01.0: PME# supported from D0 D3hot D3cold > pci 0001:82:01.0: PME# disabled > pci 0001:82:02.0: found [10b5/8509] class 000604 header type 01 > pci 0001:82:02.0: PME# supported from D0 D3hot D3cold > pci 0001:82:02.0: PME# disabled > pci 0001:82:03.0: found [10b5/8509] class 000604 header type 01 > pci 0001:82:03.0: PME# supported from D0 D3hot D3cold > pci 0001:82:03.0: PME# disabled > pci 0001:82:04.0: found [10b5/8509] class 000604 header type 01 > pci 0001:82:04.0: PME# supported from D0 D3hot D3cold > pci 0001:82:04.0: PME# disabled > PCI: Fixups for bus 0001:82 > PCI: bridge 0001:81:00.0 32bit mmio: [b8100000, b81fffff] > pci 0001:82:01.0: scanning behind bridge, config 030302, pass 0 > pci 0001:82:01.0: bus configuration doesn't match, reconfiguring > pci 0001:82:02.0: scanning behind bridge, config 040402, pass 0 > pci 0001:82:02.0: bus configuration doesn't match, reconfiguring > pci 0001:82:03.0: scanning behind bridge, config 050502, pass 0 > pci 0001:82:03.0: bus configuration doesn't match, reconfiguring > pci 0001:82:04.0: scanning behind bridge, config 060602, pass 0 > pci 0001:82:04.0: bus configuration doesn't match, reconfiguring > pci 0001:82:01.0: scanning behind bridge, config 000000, pass 1 > pci 0001:82:01.0: bus configuration doesn't match, reconfiguring > PCI: Scanning bus 0001:83 > PCI: Fixups for bus 0001:83 > PCI: Bus scan for 0001:83 returning with max=83 > pci 0001:82:02.0: scanning behind bridge, config 000000, pass 1 > pci 0001:82:02.0: bus configuration doesn't match, reconfiguring > PCI: Scanning bus 0001:84 > PCI: Fixups for bus 0001:84 > PCI: Bus scan for 0001:84 returning with max=84 > pci 0001:82:03.0: scanning behind bridge, config 000000, pass 1 > pci 0001:82:03.0: bus configuration doesn't match, reconfiguring > PCI: Scanning bus 0001:85 > pci 0001:85:00.0: found [1095/3531] class 000180 header type 00 > PCI: 0001:85:00.0 reg 10 64bit mmio: [b8100000, b810007f] > PCI: 0001:85:00.0 reg 18 64bit mmio: [b8102000, b8103fff] > PCI: 0001:85:00.0 reg 20 io port: [ffffff80, ffffffff] > pci 0001:85:00.0: supports D1 > pci 0001:85:00.0: supports D2 > PCI: Fixups for bus 0001:85 > PCI: bridge 0001:82:03.0 32bit mmio: [b8100000, b81fffff] > PCI: Bus scan for 0001:85 returning with max=85 > pci 0001:82:04.0: scanning behind bridge, config 000000, pass 1 > pci 0001:82:04.0: bus configuration doesn't match, reconfiguring > PCI: Scanning bus 0001:86 > PCI: Fixups for bus 0001:86 > PCI: Bus scan for 0001:86 returning with max=86 > PCI: Bus scan for 0001:82 returning with max=86 > PCI: Bus scan for 0001:81 returning with max=86 > PCI: Bus scan for 0001:80 returning with max=86 > PCI: Scanning bus 0002:00 > PCI: Fixups for bus 0002:00 > PCI: Bus scan for 0002:00 returning with max=00 > pci 0001:82:01.0: PCI bridge, secondary bus 0001:83 > pci 0001:82:01.0: IO window: disabled > pci 0001:82:01.0: MEM window: disabled > pci 0001:82:01.0: PREFETCH window: disabled > pci 0001:82:02.0: PCI bridge, secondary bus 0001:84 > pci 0001:82:02.0: IO window: disabled > pci 0001:82:02.0: MEM window: disabled > pci 0001:82:02.0: PREFETCH window: disabled > pci 0001:82:03.0: PCI bridge, secondary bus 0001:85 > pci 0001:82:03.0: IO window: 0x00-0xfff > pci 0001:82:03.0: MEM window: 0x80000000-0x800fffff > pci 0001:82:03.0: PREFETCH window: disabled > pci 0001:82:04.0: PCI bridge, secondary bus 0001:86 > pci 0001:82:04.0: IO window: disabled > pci 0001:82:04.0: MEM window: disabled > pci 0001:82:04.0: PREFETCH window: disabled > pci 0001:81:00.0: PCI bridge, secondary bus 0001:82 > pci 0001:81:00.0: IO window: 0x00-0xfff > pci 0001:81:00.0: MEM window: 0x80000000-0x800fffff > pci 0001:81:00.0: PREFETCH window: disabled > pci 0001:80:00.0: PCI bridge, secondary bus 0001:81 > pci 0001:80:00.0: IO window: 0x00-0xfff > pci 0001:80:00.0: MEM window: 0x80000000-0x801fffff > pci 0001:80:00.0: PREFETCH window: disabled > pci 0001:81:00.0: enabling device (0006 -> 0007) > pci 0001:82:03.0: enabling device (0006 -> 0007) > bus: 40 index 0 io port: [fffc0000, fffcffff] > bus: 40 index 1 mmio: [e00000000, e7fffffff] > bus: 80 index 0 io port: [fffe0000, fffeffff] > bus: 80 index 1 mmio: [e80000000, effffffff] > bus: 81 index 0 io port: [fffe0000, fffe0fff] > bus: 81 index 1 mmio: [e80000000, e801fffff] > bus: 81 index 2 mmio: [0, 0] > bus: 81 index 3 mmio: [0, 0] > bus: 82 index 0 io port: [fffe0000, fffe0fff] > bus: 82 index 1 mmio: [e80000000, e800fffff] > bus: 82 index 2 mmio: [0, 0] > bus: 82 index 3 mmio: [0, 0] > bus: 83 index 0 mmio: [0, 0] > bus: 83 index 1 mmio: [0, 0] > bus: 83 index 2 mmio: [0, 0] > bus: 83 index 3 mmio: [0, 0] > bus: 84 index 0 mmio: [0, 0] > bus: 84 index 1 mmio: [0, 0] > bus: 84 index 2 mmio: [0, 0] > bus: 84 index 3 mmio: [0, 0] > bus: 85 index 0 io port: [fffe0000, fffe0fff] > bus: 85 index 1 mmio: [e80000000, e800fffff] > bus: 85 index 2 mmio: [0, 0] > bus: 85 index 3 mmio: [0, 0] > bus: 86 index 0 mmio: [0, 0] > bus: 86 index 1 mmio: [0, 0] > bus: 86 index 2 mmio: [0, 0] > bus: 86 index 3 mmio: [0, 0] > bus: 00 index 0 io port: [0, ffff] > bus: 00 index 1 mmio: [d80000000, dffffffff] > SCSI subsystem initialized > libata version 3.00 loaded. > usbcore: registered new interface driver usbfs > usbcore: registered new interface driver hub > usbcore: registered new device driver usb > NET: Registered protocol family 2 > Switched to high resolution mode on CPU 0 > IP route cache hash table entries: 16384 (order: 4, 65536 bytes) > TCP established hash table entries: 65536 (order: 7, 524288 bytes) > TCP bind hash table entries: 65536 (order: 6, 262144 bytes) > TCP: Hash tables configured (established 65536 bind 65536) > TCP reno registered > NET: Registered protocol family 1 > checking if image is initramfs...it isn't (no cpio magic); looks like an initrd > Freeing initrd memory: 3242k freed > SATA port disabled via device-tree > JFFS2 version 2.2. (NAND) © 2001-2006 Red Hat, Inc. > msgmni has been set to 1008 > io scheduler noop registered > io scheduler anticipatory registered (default) > io scheduler deadline registered > io scheduler cfq registered > pcieport-driver 0001:80:00.0: found MSI capability > pci_express 0001:80:00.0:pcie00: allocate port service > pci_express 0001:80:00.0:pcie01: allocate port service > pcieport-driver 0001:81:00.0: found MSI capability > pcieport-driver 0001:82:01.0: found MSI capability > pci_express 0001:82:01.0:pcie22: allocate port service > pcieport-driver 0001:82:02.0: found MSI capability > pci_express 0001:82:02.0:pcie22: allocate port service > pcieport-driver 0001:82:03.0: found MSI capability > pci_express 0001:82:03.0:pcie22: allocate port service > pcieport-driver 0001:82:04.0: found MSI capability > aer 0001:80:00.0:pcie01: request IRQ failed > aer: probe of 0001:80:00.0:pcie01 failed with error -38 > pci_hotplug: PCI Hot Plug PCI Core version: 0.5 > pciehp: HPC vendor_id 10b5 device_id 8509 ss_vid 0 ss_did 0 > hpdriver 0001:82:01.0:pcie22: service driver hpdriver loaded > pciehp: HPC vendor_id 10b5 device_id 8509 ss_vid 0 ss_did 0 > hpdriver 0001:82:02.0:pcie22: service driver hpdriver loaded > pciehp: HPC vendor_id 10b5 device_id 8509 ss_vid 0 ss_did 0 > hpdriver 0001:82:03.0:pcie22: service driver hpdriver loaded > pciehp: PCI Express Hot Plug Controller Driver version: 0.4 > fakephp: Fake PCI Hot Plug Controller Driver > fakephp: pci_hp_register failed with error -16 > Serial: 8250/16550 driver4 ports, IRQ sharing enabled > serial8250.0: ttyS0 at MMIO 0x4ef600300 (irq = 22) is a 16550A > console [ttyS0] enabled > serial8250.0: ttyS1 at MMIO 0x4ef600400 (irq = 24) is a 16550A > serial8250.0: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550A > serial8250.0: ttyS3 at MMIO 0x4ef600600 (irq = 25) is a 16550A > 4ef600300.serial: ttyS0 at MMIO 0x4ef600300 (irq = 22) is a 16550A > 4ef600400.serial: ttyS1 at MMIO 0x4ef600400 (irq = 24) is a 16550A > 4ef600500.serial: ttyS2 at MMIO 0x4ef600500 (irq = 29) is a 16550A > 4ef600600.serial: ttyS3 at MMIO 0x4ef600600 (irq = 25) is a 16550A > brd: module loaded > PPC 4xx OCP EMAC driver, version 3.54 > MAL v2 /plb/mcmal, 2 TX channels, 16 RX channels > ZMII /plb/opb/emac-zmii@ef600d00 initialized > RGMII /plb/opb/emac-rgmii@ef601500 initialized with MDIO support > TAH /plb/opb/emac-tah@ef601350 initialized > TAH /plb/opb/emac-tah@ef601450 initialized > /plb/opb/emac-rgmii@ef601500: input 0 in RGMII mode > eth0: EMAC-0 /plb/opb/ethernet@ef600e00, MAC 00:10:ec:01:02:b9 > eth0: found Generic MII PHY (0x00) > /plb/opb/emac-rgmii@ef601500: input 1 in RGMII mode > eth1: EMAC-1 /plb/opb/ethernet@ef600f00, MAC 00:10:ec:81:02:b9 > eth1: found Generic MII PHY (0x01) > Driver 'sd' needs updating - please use bus_type methods > sata_sil24 0001:85:00.0: version 1.1 > sata_sil24 0001:85:00.0: enabling device (0006 -> 0007) > scsi0 : sata_sil24 > ata1: SATA max UDMA/100 host m128@0xe80002000 port 0xe80000000 irq 21 > ata1: SATA link down (SStatus 0 SControl 0) > 4cc000000.nor_flash: Found 1 x16 devices at 0x0 in 16-bit bank > Amd/Fujitsu Extended Query Table at 0x0040 > 4cc000000.nor_flash: CFI does not contain boot bank location. Assuming top. > number of CFI chips: 1 > cfi_cmdset_0002: Disabling erase-suspend-program due to code brokenness. > RedBoot partition parsing not available > Creating 7 MTD partitions on "4cc000000.nor_flash": > 0x00000000-0x001e0000 : "kernel" > 0x001e0000-0x00200000 : "dtb" > 0x00200000-0x01600000 : "ramdisk" > 0x01600000-0x01a00000 : "jffs2" > 0x01a00000-0x03f60000 : "user" > 0x03f60000-0x03fa0000 : "env" > 0x03fa0000-0x04000000 : "u-boot" > NDFC NAND Driver initialized. Chip-Rev: 0x00000111 > NAND device: Manufacturer ID: 0x20, Chip ID: 0xf1 (ST Micro NAND 128MiB 3,3V 8-) > Scanning device for bad blocks > Bad eraseblock 764 at 0x05f80000 > Number of partitions 3 > Creating 3 MTD partitions on "NAND 128MiB 3,3V 8-bit": > 0x00000000-0x00100000 : "u-boot" > 0x00100000-0x00140000 : "env" > 0x00140000-0x08000000 : "content" > ohci_hcd: 2006 August 04 USB 1.1 'Open' Host Controller (OHCI) Driver > ppc-of-ohci 4bffd0000.usb: OF OHCI > ppc-of-ohci 4bffd0000.usb: new USB bus registered, assigned bus number 1 > ppc-of-ohci 4bffd0000.usb: irq 40, io mem 0x4bffd0000 > usb usb1: configuration #1 chosen from 1 choice > hub 1-0:1.0: USB hub found > hub 1-0:1.0: 1 port detected > usb usb1: New USB device found, idVendor=1d6b, idProduct=0001 > usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1 > usb usb1: Product: OF OHCI > usb usb1: Manufacturer: Linux 2.6.27-01160-gc08fd34-dirty ohci_hcd > usb usb1: SerialNumber: PPC-OF USB > Initializing USB Mass Storage driver... > usbcore: registered new interface driver usb-storage > USB Mass Storage support registered. > dwc_otg: version 2.60a 22-NOV-2006 > dwc_otg: Shared Tx FIFO mode > dwc_otg: Using Slave mode > dwc_otg dwc_otg.0: DWC OTG Controller > dwc_otg dwc_otg.0: new USB bus registered, assigned bus number 2 > dwc_otg dwc_otg.0: irq 28, io mem 0x00000000 > dwc_otg: dwc_otg_core_host_init: Unable to clear halt on channel 1 > dwc_otg: Init: Port Power? op_state=4 > usb usb2: configuration #1 chosen from 1 choice > hub 2-0:1.0: USB hub found > hub 2-0:1.0: 1 port detected > usb usb2: New USB device found, idVendor=1d6b, idProduct=0002 > usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1 > usb usb2: Product: DWC OTG Controller > usb usb2: Manufacturer: Linux 2.6.27-01160-gc08fd34-dirty dwc_otg_hcd > usb usb2: SerialNumber: dwc_otg.0 > i2c /dev entries driver > ibm-iic 4ef600700.i2c: clckdiv = 9 > rtc-m41t80 0-0068: chip found, driver version 0.05 > rtc-m41t80 0-0068: rtc core: registered m41t80 as rtc0 > ibm-iic 4ef600700.i2c: using standard (100 kHz) mode > ibm-iic 4ef600800.i2c: clckdiv = 9 > ibm-iic 4ef600800.i2c: using standard (100 kHz) mode > 24c01a EEPROM driver initialized > TCP cubic registered > NET: Registered protocol family 17 > RPC: Registered udp transport module. > RPC: Registered tcp transport module. > rtc-m41t80 0-0068: setting system clock to 2008-10-20 17:08:34 UTC (1224522514) > eth0: link is up, 100 FDX, pause enabled > IP-Config: Complete: > device=eth0, addr=169.254.0.199, mask=255.255.255.0, gw=169.254.0.100, > host=tanosx, domain=, nis-domain=(none), > bootserver=169.254.0.100, rootserver=169.254.0.100, rootpath= > RAMDISK: Compressed image found at block 0 > VFS: Mounted root (ext2 filesystem). > Freeing unused kernel memory: 160k init > # > _______________________________________________ > Linuxppc-dev mailing list > Linuxppc-dev@ozlabs.org > https://ozlabs.org/mailman/listinfo/linuxppc-dev ^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: Problems with PCI-E devices not being detected with switch 2008-10-20 21:57 ` Benjamin Herrenschmidt @ 2008-10-20 22:14 ` Ayman El-Khashab 2008-10-20 22:55 ` Benjamin Herrenschmidt 0 siblings, 1 reply; 17+ messages in thread From: Ayman El-Khashab @ 2008-10-20 22:14 UTC (permalink / raw) To: linuxppc-dev Benjamin Herrenschmidt wrote: >>>=20 >>> + /* Check if setup is sensible at all */ >>> + if ((buses & 0xff) !=3D bus->number || >>> + ((buses >> 8) & 0xff) !=3D <=3D bus->number) { >>=20 >> Note that I removed the <=3D from the above line -- I did not think = it >> was correct. Please let me know if that was wrong. >=20 > My logic is that the current setup is incorrect if the primary bus of > the bridge doesn't match the parent bus number, or if the secondary > bus number of the bridge is not strictly superior to the parent bus > number. =20 >=20 > What sounds incorrect ? >=20 The part that didn't look correct is this line (note the operators) ((buses >> 8) & 0xff) !=3D <=3D bus->number) { Operators ^^ ^^ >From reading through the code and your textual description of what was supposed to be happening, I went ahead and changed it to ...=20 ((buses >> 8) & 0xff) !=3D bus->number) { And this is the code that generated the results from my previous message. Hope that made sense ... Regards, Ayman ^ permalink raw reply [flat|nested] 17+ messages in thread
* RE: Problems with PCI-E devices not being detected with switch 2008-10-20 22:14 ` Ayman El-Khashab @ 2008-10-20 22:55 ` Benjamin Herrenschmidt 0 siblings, 0 replies; 17+ messages in thread From: Benjamin Herrenschmidt @ 2008-10-20 22:55 UTC (permalink / raw) To: Ayman El-Khashab; +Cc: linuxppc-dev > The part that didn't look correct is this line (note the operators) > > ((buses >> 8) & 0xff) != <= bus->number) { > > Operators ^^ ^^ Ooohhh ... nice typo :-) The right one is <=, thanks for catching this ! > >From reading through the code and your textual description of what was > supposed to be happening, I went ahead and changed it to ... > > ((buses >> 8) & 0xff) != bus->number) { > > And this is the code that generated the results from my previous > message. Yeah, that's enough to catch most of the problems incuding yours. Cheers, Ben. ^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2008-10-20 22:55 UTC | newest] Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2008-10-15 15:47 Problems with PCI-E devices not being detected with switch Ayman El-Khashab 2008-10-16 5:20 ` Benjamin Herrenschmidt 2008-10-16 8:03 ` Stefan Roese 2008-10-16 8:29 ` Benjamin Herrenschmidt 2008-10-16 8:48 ` Stefan Roese 2008-10-16 8:58 ` Benjamin Herrenschmidt 2008-10-16 15:01 ` Ayman El-Khashab 2008-10-16 21:19 ` Benjamin Herrenschmidt 2008-10-17 0:10 ` Benjamin Herrenschmidt 2008-10-17 7:22 ` Stefan Roese 2008-10-17 14:54 ` Ayman El-Khashab 2008-10-17 21:05 ` Benjamin Herrenschmidt 2008-10-17 21:19 ` Benjamin Herrenschmidt 2008-10-20 21:03 ` Ayman El-Khashab 2008-10-20 21:57 ` Benjamin Herrenschmidt 2008-10-20 22:14 ` Ayman El-Khashab 2008-10-20 22:55 ` Benjamin Herrenschmidt
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).