System Administration Guide, Volume 1

IA: PCI Hot-Plugging With the cfgadm Command

The following section describes different hot-plugging operations and then provides step-by-step instructions for hot-plugging PCI adapter cards on IA based systems.

In the following examples, only PCI attachment points are listed, for brevity. The attachment points displayed on your system will depend on your system configuration.

IA: How to Display PCI Slot Configuration Information

The cfgadm(1M) command displays the status of PCI hot-pluggable devices and slots on a system.

  1. Become superuser.

  2. Display PCI slot configuration information.


    # cfgadm
    Ap_Id                Type         Receptacle   Occupant     Condition
    pci1:hpc0_slot0      unknown      empty        unconfigured unknown
    pci1:hpc0_slot1      unknown      empty        unconfigured unknown
    pci1:hpc0_slot2      unknown      empty        unconfigured unknown
    pci1:hpc0_slot3      ethernet/hp  connected    configured   ok
    pci1:hpc0_slot4      unknown      empty        unconfigured unknown
    # cfgadm -s "cols=ap_id:type:info" pci
    Ap_Id                Type         Information
    pci1:hpc0_slot0      unknown      Slot 7
    pci1:hpc0_slot1      unknown      Slot 8
    pci1:hpc0_slot2      unknown      Slot 9
    pci1:hpc0_slot3      ethernet/hp  Slot 10
    pci1:hpc0_slot4      unknown      Slot 11

The logical ap_id, pci1:hpc0_slot0, is the logical ap_id for that particular hot-pluggable slot, Slot 7, (physical identification of this slot). The component hpc0 indicates the hot-pluggable adapter card for this slot and pci1 indicates the PCI bus instance. The Type field indicates the type of PCI adapter card present in the slot.

IA: How to Remove a PCI Adapter Card

  1. Become superuser.

  2. Determine which slot the adapter card is in.


    # cfgadm
    Ap_Id                Type         Receptacle   Occupant     Condition
    pci1:hpc0_slot0      unknown      empty        unconfigured unknown
    pci1:hpc0_slot1      unknown      empty        unconfigured unknown
    pci1:hpc0_slot2      unknown      empty        unconfigured unknown
    pci1:hpc0_slot3      ethernet/hp  connected    configured   ok
    pci1:hpc0_slot4      unknown      empty        unconfigured unknown
  3. Stop the application that has the device open.

    For example, if this is an ethernet card, use ifconfig(1M) to bring down the interface and unplumb the interface.

  4. Unconfigure the device.


    # cfgadm -c unconfigure pci1:hpc0_slot3   
    
  5. Confirm the device has been unconfigured.


    # cfgadm
    Ap_Id                Type         Receptacle   Occupant     Condition
    pci1:hpc0_slot0      unknown      empty        unconfigured unknown
    pci1:hpc0_slot1      unknown      empty        unconfigured unknown
    pci1:hpc0_slot2      unknown      empty        unconfigured unknown
    pci1:hpc0_slot3      ethernet/hp  connected    unconfigured unknown
    pci1:hpc0_slot4      unknown      empty        unconfigured unknown
  6. Disconnect the power to the slot.


    # cfgadm -c disconnect pci1:hpc0_slot3
    
  7. Confirm the device has been disconnected.


    # cfgadm
    Ap_Id                Type         Receptacle   Occupant     Condition
    pci1:hpc0_slot0      unknown      empty        unconfigured unknown
    pci1:hpc0_slot1      unknown      empty        unconfigured unknown
    pci1:hpc0_slot2      unknown      empty        unconfigured unknown
    pci1:hpc0_slot3      ethernet/hp  disconnected unconfigured unknown
    pci1:hpc0_slot4      unknown      empty        unconfigured unknown
  8. Open the slot latches and remove the board.

IA: How to Add a PCI Adapter Card

  1. Become superuser.

  2. Identify the hot-pluggable slot and open latches.

  3. Insert the adapter card into a hot-pluggable slot.

  4. Determine which slot the adapter card is in once it is inserted and the latches are closed.


    # cfgadm
    Ap_Id                Type         Receptacle   Occupant     Condition
    pci1:hpc0_slot0      unknown      empty        unconfigured unknown
    pci1:hpc0_slot1      unknown      empty        unconfigured unknown
    pci1:hpc0_slot2      unknown      empty        unconfigured unknown
    pci1:hpc0_slot3      ethernet/hp  disconnected unconfigured unknown
    pci1:hpc0_slot4      unknown      empty        unconfigured unknown
  5. Connect the power to the slot.


    # cfgadm -c connect pci1:hpc0_slot3
    
  6. Confirm the slot is connected.


    # cfgadm
    Ap_Id                Type         Receptacle   Occupant     Condition
    pci1:hpc0_slot0      unknown      empty        unconfigured unknown
    pci1:hpc0_slot1      unknown      empty        unconfigured unknown
    pci1:hpc0_slot2      unknown      empty        unconfigured unknown
    pci1:hpc0_slot3      ethernet/hp  connected    unconfigured unknown
    pci1:hpc0_slot4      unknown      empty        unconfigured unknown
  7. Configure the PCI hot-pluggable adapter card.


    # cfgadm -c configure pci1:hpc0_slot3
    
  8. Verify the configuration of the adapter card in the slot.


    # cfgadm
    Ap_Id                Type         Receptacle   Occupant     Condition
    pci1:hpc0_slot0      unknown      empty        unconfigured unknown
    pci1:hpc0_slot1      unknown      empty        unconfigured unknown
    pci1:hpc0_slot2      unknown      empty        unconfigured unknown
    pci1:hpc0_slot3      ethernet/hp  connected    configured   unknown
    pci1:hpc0_slot4      unknown      empty        unconfigured unknown
  9. Configure any supporting software if this is a new device.

    For example, if this is an ethernet card, use the ifconfig(1m) command to set up the interface.

IA: Troubleshooting PCI Configuration Problems

Error Message

cfgadm: Configuration operation invalid: invalid transition
Cause

An invalid transition was attempted.

Solution

Check whether the cfgadm -c command was issued appropriately. Use cfgadm to check the current receptacle and occupant state and make sure the ap_id is correct.

Error Message

cfgadm: Attachment point not found
Cause

Specified attachment point was not found.

Solution

Check whether the attachment point is correct. Use cfgadm to display a list of available attachment points. Also check the physical path to see if the attachment point is still there.


Note -

In addition to the cfgadm command, several other commands are helpful during hot-plug operations. The prtconf(1M) command displays whether or not Solaris recognizes the hardware. After inserting hardware, use the prtconf command to verify that the hardware is recognized. After a configure operation, use the prtconf -D command to verify the driver is attached to the newly installed hardware device.