linux-hotplug.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* PCIe hotplug on far PCIe switch ports
@ 2005-10-12 17:07 Thomas Schäfer
  2005-10-12 18:28 ` Greg KH
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Thomas Schäfer @ 2005-10-12 17:07 UTC (permalink / raw)
  To: linux-hotplug

Hi,

I'm using a Pentium M processor module with Intel E7320 (Lindenhurst) chipset and linux 2.6.14-rc4 from kernel.org. One of the chipsets PCIe ports has a PEX8532 PCIe switch attached and one of the switch ports hosts a network adapter. I want to perform PCIe hotplugging with the network adapter and tried loading the pciehp.ko driver, but without success.

   <snip>

   pciehp: add_host_bridge: status 5
   pciehp: add_host_bridge: osc_run_status 1
   pciehp: acpi_pciehprm: Registered PCI HOST Bridge(00)    on s:b:d:f(00:00:00:00) [\_SB_.PCI0]
   pciehp: acpi_pciehprm: P2P(0-1) on pci=b:d:f(0:2:0) acpi=b:d:f(0:2:0) [\_SB_.PCI0.EPA0]
   pciehp: acpi_pciehprm: Registered PCI  P2P Bridge(00-01) on s:b:d:f(00:00:02:00) [\_SB_.PCI0.EPA0]
   pciehp: acpi_pciehprm: P2P(0-2) on pci=b:d:f(0:3:0) acpi=b:d:f(0:3:0) [\_SB_.PCI0.EPA1]
   pciehp: acpi_pciehprm: Registered PCI  P2P Bridge(00-02) on s:b:d:f(00:00:03:00) [\_SB_.PCI0.EPA1]
   pciehp: acpi_pciehprm: P2P(0-9) on pci=b:d:f(0:1c:0) acpi=b:d:f(0:1c:0) [\_SB_.PCI0.P0P3]
   pciehp: acpi_pciehprm: Registered PCI  P2P Bridge(00-09) on s:b:d:f(00:00:1c:00) [\_SB_.PCI0.P0P3]
   pciehp: acpi_pciehprm: P2P(0-a) on pci=b:d:f(0:1e:0) acpi=b:d:f(0:1e:0) [\_SB_.PCI0.P0P4]
   pciehp: acpi_pciehprm: Registered PCI  P2P Bridge(00-0a) on s:b:d:f(00:00:1e:00) [\_SB_.PCI0.P0P4]
   pciehp: Fails to gain control of native hot-plug
   pciehp: pciehprm ACPI init fail

The driver can only find the root bridges of the chipset (EPA0, EPA1, P0P3, P0P4), but not the bridges associated to the switch. In my understanding this is due to the ACPI BIOS which fails to create a namespace holding the entire PCI tree.

In a second try, I built a kernel without ACPI support. Now the PCIe hotplug driver is loaded properly and installs the ports of the switch as hotplug slots. When pressing the attention button, the driver of the network adapter is unloaded and the adapter is properly removed from the PCI tree. But when pressing the attention button again, reinsertion of the network adapter in the PCI tree works, but loading the driver fails:

   <snip>

   pciehp: PCI function Hot-Added s:b:d:f(00:06:00:00)
   pciehp: returning from configure_new_device
   pciehp: board_added: back from configure_new_device
   pciehp: pciehp_resource_sort_and_combine: head = f70782f0, *head = f7283b60
   pciehp: *head->next = 00000000
   pciehp: pciehp_resource_sort_and_combine: head = f70782f4, *head = f7d7f8a0
   pciehp: *head->next = 00000000
   pciehp: pciehp_resource_sort_and_combine: head = f70782f8, *head = 00000000
   pciehp: pciehp_resource_sort_and_combine: head = f70782fc, *head = f7d7ff40
   pciehp: *head->next = 00000000
   pciehp: pciehp_slot_find: bus 6 device 0 index 0
   pciehp: pciehp_slot_find: func-> bus 6 device 0 function 0 pci_dev 00000000
   pciehp: board_added:call pci_hp_configure_dev, func 1
   pciehp: pciehp_configure_device: pci_dev still null. do pci_scan_slot
   PCI: Device 0000:06:00.0 not available because of resource collisions
   tg3: Cannot enable PCI device, aborting.
   tg3: probe of 0000:06:00.0 failed with error -22
   pciehp: pciehp_slot_find: bus 6 device 0 index 1
   pciehp: pciehp_slot_find: func-> bus 6 device 0 function 0 pci_dev f7d85400

   <snip>

The resource conflict seems to be the number of the interrupt line. Immediately after booting the network adapter has interrupt number 16:

   [root@amceval ~]# lspci -vx -s 6:0.0
   06:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express (rev 11)
           Subsystem: Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express
           Flags: bus master, fast devsel, latency 0, IRQ 16
           Memory at fe9f0000 (64-bit, non-prefetchable) [sizedK]
           Expansion ROM at fe9e0000 [disabled] [sizedK]
           Capabilities: [48] Power Management version 2
           Capabilities: [50] Vital Product Data
           Capabilities: [58] Message Signalled Interrupts: 64bit+ Queue=0/3 Enable-
           Capabilities: [d0] Express Endpoint IRQ 0
   00: e4 14 59 16 06 00 10 00 11 00 00 02 10 00 00 00
   10: 04 00 9f fe 00 00 00 00 00 00 00 00 00 00 00 00
   20: 00 00 00 00 00 00 00 00 07 00 00 00 e4 14 59 16
   30: 00 00 9e fe 48 00 00 00 00 00 00 00 0a 01 00 00

Note that 0x0A is entered as interrupt number in offset 0x3C.

After the hotplug cycle, the network adapter has interrupt number 10:

[root@amceval hotplug]# lspci -vx -s 6:0.0
06:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express (rev 11)
        Subsystem: Broadcom Corporation NetXtreme BCM5721 Gigabit Ethernet PCI Express
        Flags: bus master, fast devsel, latency 0, IRQ 10
        Memory at fe900000 (64-bit, non-prefetchable) [sizedK]
        Capabilities: [48] Power Management version 2
        Capabilities: [50] Vital Product Data
        Capabilities: [58] Message Signalled Interrupts: 64bit+ Queue=0/3 Enable-
        Capabilities: [d0] Express Endpoint IRQ 0
00: e4 14 59 16 46 01 10 00 11 00 00 02 08 00 00 00
10: 04 00 90 fe 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 07 00 00 00 e4 14 59 16
30: 00 00 00 00 48 00 00 00 00 00 00 00 0a 01 00 00

My question is:

How should I proceed to get the entire PCIe hotplug cycle working? Is it necessary to fix the ACPI BIOS or is it possible to succeed without ACPI? Or am I missing something else?

Best regards,

Thomas Schäfer

____________________________________

Kontron Modular Computers GmbH

Konrad-Zuse-Str. 9
66115 Saarbrücken

Tel.: + 49 (0)681 / 95916 - 203
Fax:  + 49 (0)681 / 95916 - 100
E-mail: thomas.schaefer@kontron.com 


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
Linux-hotplug-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2005-10-13 15:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-12 17:07 PCIe hotplug on far PCIe switch ports Thomas Schäfer
2005-10-12 18:28 ` Greg KH
2005-10-12 22:16 ` Rajesh Shah
2005-10-13  1:12 ` Rajat Jain
2005-10-13  7:54 ` Thomas Schäfer
2005-10-13  9:25 ` Thomas Schäfer
2005-10-13 15:55 ` Gary Hade

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).