System Administration Guide: Basic Administration

x86: PCI Hot-Plugging With the cfgadm Command

This section provides step-by-step instructions for hot-plugging PCI adapter cards on IA based systems.

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

IA: How to Display PCI Slot Configuration Information

The cfgadmin command displays the status of PCI hot-pluggable devices and slots on a system. For more information, see cfgadm(1M).

  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

    Display specific PCI device information.


    # 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 hot-pluggable slot, Slot 7. 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 that is present in the slot.

IA: How to Remove a PCI Adapter Card

  1. Become superuser.

  2. Determine which slot the PCI 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 the device is an Ethernet card, use the ifconfig command to bring down the interface and unplumb the interface.

  4. Unconfigure the device.


    # cfgadm -c unconfigure pci1:hpc0_slot3   
    
  5. Confirm that 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 that 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 PCI adapter card.

IA: How to Add a PCI Adapter Card

  1. Become superuser.

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

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

  4. Determine which slot the PCI adapter card is in once it is inserted. Close the latches.


    # 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 that 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 adapter card.


    # cfgadm -c configure pci1:hpc0_slot3
    
  8. Verify the configuration of the PCI 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 device is a new device.

    For example, if this device is an Ethernet card, use the ifconfig command to set up the interface.

x86: 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 the cfgadm command to check the current receptacle and occupant state and to make sure that the Ap_Id is correct.

Error Message

cfgadm: Attachment point not found
Cause

The specified attachment point was not found.

Solution

Check whether the attachment point is correct. Use the cfgadm command 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-pluggable operations. The prtconf command displays whether Solaris recognizes the hardware. After adding hardware, use the prtconf command to verify that the hardware is recognized. After a configure operation, use the prtconf -D command to verify that the driver is attached to the newly installed hardware device.