[cgl_discussion] RE: [Fwd: hotswap and CGL (fwd)]

John J Grana jjg at pt.com
Thu May 1 06:32:23 PDT 2003

Not to put too fine a point on this, but some of the subtle problems with
the present implementation is starting to show itself.

Last I read the code, the present CompactPCI hotswap still relied on a PCI
bus being present on the device being swapped. In the discussion below, it
mentions a daemon that retrieves hotswap events (good) but then talks about
a vendor/device id.
In a cPCI backplane with the actual PCIbus supported, this is not a
problem. Every board has it's PCI bridge that will respond with a
vendor/device id.

Now, fast forward to what is happening today... PICMG 2.16 Packet Switched
Backplane introduced switched ethernet to the backplane, but "optionally"
allowed the PCIbus to stay in place. But, the next generation of these
class of chassis (CompactTCA) has NO PCIbus at all. Ditto for AdvancedTCA.

I had tried to kick start a thread a while back, asking the question
"Assuming no PCIbus, what is the best standards method of identifying
devices in a backplane?". This includes not only hotswapping but boot time
discovery as well. There were 2 ways proposed. IPMI or Ethernet. There were
many pros and cons to each method.

The present 2.5 cpci_hotplug code has come a long way, looks good. But, in
its present form will only support cPCI systems that have a PCIbus.
Assuming we (CGL) leave it this way, it is safe to say that both 2.6 Linux
and CGL do NOT support hotswap in "some" 2.16 systems and not at all on
CompactTCA and AdvancedTCA.

John Grana
jjg at pt.com

                      Steven Dake                                                                                                           
                      <sdake at mvista.com>              To:       "Bloch, Jack" <Jack.Bloch at icn.siemens.com>                                  
                      Sent by:                        cc:       "'Mika Kukkonen'" <mika at osdl.org>, cgl_discussion at osdl.org                  
                      cgl_discussion-admin at lis        Subject:  Re: [cgl_discussion] RE: [Fwd: hotswap and CGL (fwd)]                       
                      04/30/2003 05:14 PM                                                                                                   


You will need to turn on CompactPCI hotswap (which is different from the
hotplug code).  The had daemon can be used to retrieve hotswap events to
take some action when a hotswap event of a specific vendor/device id
occurs. (the had supports tulip, eepro ethernet drivers).

Once you have the CompactPCI hotswap code turned on, any time an hotswap
event occurs, the probe/remove routine will be called.  The hotswap
event is triggered by opening or closing the bottom latch.

Then in the probe routine of your driver, you must tell the Cpci hotswap
layer about the new device with a:


where pdev is a device of type struct pci_dev *.

The remove function should add a

In MontaVista's implementation, only certain chassis are implemented
(because of the way ENUM works, it is chassis specific).  For more
details, you can talk to the owner of the feature Mark Huth, but he is
out of the office until this Friday.  His email is mhuth at mvista.com.

I could be wrong, but MontaVista is the only linux vendor making
available compact PCI hotswap support in linux 2.4.


Bloch, Jack wrote:

>Thanks for your response. Maybe I should clarify a little. We are
>evaluating two Linux distro's (namely SuSE's SLES8 and MontaVista). Both
>based on 2.4 kernels but purport to support the CGL 1.1 spec including
>hotswap. I ran chckconfig and hotplug is on.
>I wriote a simple driver for a cPCI board which has a hotswap PCI
>(in a cPCI chassis). The driver declares a MODULE_DEVICE_TABLE and has a
>simple probe and remove routine. When I load the driver via insmod, I see
>the probe routine get called for each device in the system and the remove
>routine is called on rmmod. What I do not see however, is the probe
>get called on insertion or on removal of device. There are a couple of
>possibilitioes here. Either their hotswap implementation is not working or
>the board is not generating the correct PCI signals/interrupts. Do you
>any idea of how the sequence of events is supposed to be when I open the
>ejector handle?
>My understanding is as follows.
>An NMI occurs on affected board.
>Board should generate the #ENUM signal
>An ISR should be linked to #ENUM and should scan the device and call the
>correct driver.
>The above is a little high level but maybe you can clarify for me.
>Jack Bloch
>Siemens ICN
>phone                (561) 923-6550
>e-mail                jack.bloch at icn.siemens.com
>-----Original Message-----
>From: Mika Kukkonen [mailto:mika at osdl.org]
>Sent: Wednesday, April 30, 2003 3:59 PM
>To: Bloch, Jack
>Cc: cgl_discussion at osdl.org
>Subject: [Fwd: hotswap and CGL (fwd)]
>Please use cgl_discussion for CGL related questions; info at osdl.org
>is something totally different ...
>What comes to your question, there already is a lot of hotswap
>functionality in 2.5 kernel, here is one place to look for
>            http://linux-hotplug.sourceforge.net/?selected=pci
>Of course some of the CGL compliant distros have implemented
>additional stuff on top of that; I'll let them to comment on that.
>-----Forwarded Message-----
>>From: Bryce Harrington <bryce at osdl.org>
>>To: mika at osdl.org
>>Cc: info at osdl.org
>>Subject: hotswap and CGL (fwd)
>>Date: 30 Apr 2003 12:03:08 -0700
>>---------- Forwarded message ----------
>>Date: Wed, 30 Apr 2003 11:58:55 -0700
>>From: "Bloch, Jack" <Jack.Bloch at icn.siemens.com>
>>To: "'info at osdl.org'" <info at osdl.org>
>>Subject: hotswap and CGL
>>I am a developer at Siemens. We are validating CGL for use in a project.
>>Hotswap is for us an extremely important feature. Is there any
>>of how the proposal will work for a cPCI environment? I have reasd the
>>documents and do not find a description.
>>Jack Bloch
>>Siemens ICN
>>phone                (561) 923-6550
>>e-mail                jack.bloch at icn.siemens.com
>cgl_discussion mailing list
>cgl_discussion at lists.osdl.org

cgl_discussion mailing list
cgl_discussion at lists.osdl.org

More information about the cgl_discussion mailing list