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

Steven Dake sdake at mvista.com
Wed Apr 30 14:14:23 PDT 2003


Jack,

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:

    CpciRegisterDevice(pdev);

where pdev is a device of type struct pci_dev *.

The remove function should add a
        CpciUnRegisterDevice(pdev);

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.

Thanks
-steve

Bloch, Jack wrote:

>Thanks for your response. Maybe I should clarify a little. We are currently
>evaluating two Linux distro's (namely SuSE's SLES8 and MontaVista). Both are
>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 controller
>(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 routine
>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 have
>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
>information:
>	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.
>
>--MiKu
>
>-----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 description
>>of how the proposal will work for a cPCI environment? I have reasd the
>>    
>>
>OSDL
>  
>
>>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
>http://lists.osdl.org/mailman/listinfo/cgl_discussion
>
>
>
>  
>




More information about the cgl_discussion mailing list