Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

System Administration Guide: Devices and File Systems
Previous Next

PCI or PCIe Hot-Plugging With the cfgadm Command

This section provides step-by-step instructions for hot-plugging PCI or PCIe adapter cards on SPARC and x86 systems.

In addition to the cfgadm command, the prtconf command is helpful during hot-plug operations. The prtconf command displays additional configuration information that pertains to the hardware.

After adding hardware, you can use the prtconf command to verify that the hardware is configured correctly. For example, after a configure operation, use the prtconf -D command to verify that the driver is attached to the newly installed hardware device. If the device driver has not been added to the system prior to hardware configuration, it may be manually added by using the add_drv command.

For more information, see prtconf(1M) and add_drv(1M).

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.

PCIe Led Indicator Behavior

You might observe the LED indicators on the system to get a visual indication about the status of the slot's hot-plug operation. The LED behavior, in case of PCI Express, matches that defined in the PCI Express specification or the behavior might otherwise be platform dependent.

Please refer to your platform guide for specific details. In case of PCI Express, when the Attention Button is pressed, the power indicator blinks, which indicates the beginning of a state transition. The blinking ends when the state transition has ended.

How to Display PCI Slot Configuration Information

This procedure has been updated to include PCIe configuration information.

The cfgadm 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 configuration information.
    • Display PCI slot configuration information.

      For example:

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

      For example:

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

    • Display PCIe slot configuration information.

      For example:

      # cfgadm pci
      Ap_Id                          Type         Receptacle   Occupant     Condition
      pcie1                          unknown      empty        unconfigured unknown
      pcie2                          unknown      empty        unconfigured unknown
      pcie3                          unknown      empty        unconfigured unknown
      pcie4                          etherne/hp   connected    configured   ok
      pcie5                          pci-pci/hp   connected    configured   ok
      pcie6                          unknown      disconnected unconfigured unknown
    • Display specific PCIe device information.

      For example:

      # cfgadm -s "cols=ap_id:busy:o_state" pci
      Ap_Id                          Busy     Occupant
      pcie1                          n        unconfigured
      pcie2                          n        unconfigured
      pcie3                          n        unconfigured
      pcie4                          n        configured
      pcie5                          n        configured
      pcie6                          n        configured

      Note - The logical Ap_Id in most cases should match the slot label that is silk-screened on the system chassis. Refer to your platform guide for the cfgadm output of the hot-pluggable slots. The Busy field can be displayed to ensure that the Ap_Id is not transitioning to another state before a hot-plug operation is attempted.


How to Remove a PCI Adapter Card

The following procedure has been updated for removing a PCIe adapter card. However, the procedure to remove an adapter card is the same whether you are using PCI or PCIe.

  1. Become superuser.
  2. Determine which slot the PCI adapter card is in.

    For example:

    # cfgadm pci
    Ap_Id                          Type         Receptacle   Occupant     Condition
    pcie1                          unknown      empty        unconfigured unknown
    pcie2                          unknown      empty        unconfigured unknown
    pcie3                          unknown      empty        unconfigured unknown
    pcie4                          etherne/hp   connected    configured   ok
    pcie5                          pci-pci/hp   connected    configured   ok
    pcie6                          unknown      disconnected 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 manually by using the cfgadm(1M) command as shown below. Or, if you have a PCIe adapter card, use the auto-configuration method, such as pressing the slot's Attention Button as defined by your platform guide.
    # cfgadm -c unconfigure pcie4
  5. Confirm that the device has been unconfigured.

    For example:

    # cfgadm pci
    Ap_Id                          Type         Receptacle   Occupant     Condition
    pcie1                          unknown      empty        unconfigured unknown
    pcie2                          unknown      empty        unconfigured unknown
    pcie3                          unknown      empty        unconfigured unknown
    pcie4                          unknown      connected    unconfigured unknown
    pcie5                          pci-pci/hp   connected    configured   ok
    pcie6                          unknown      disconnected unconfigured unknown

    Note - The Type and Condition also become unknown when the device is unconfigured.


  6. Disconnect the power to the slot manually. If the auto-configuration method is used, this step is not necessary. Refer to your platform guide for more information.
    # cfgadm -c disconnect pcie4
  7. Confirm that the device has been disconnected.

    For example:

    # cfgadm pci
    Ap_Id                          Type         Receptacle   Occupant     Condition
    pcie1                          unknown      empty        unconfigured unknown
    pcie2                          unknown      empty        unconfigured unknown
    pcie3                          unknown      empty        unconfigured unknown
    pcie4                          unknown      disconnected unconfigured unknown
    pcie5                          pci-pci/hp   connected    configured   ok
    pcie6                          unknown      disconnected unconfigured unknown 
  8. Follow appropriate instructions in your platform guide to remove the PCI adapter card. After the card is removed, the Receptacle state is empty.

    For example:

    # cfgadm pci
    Ap_Id                          Type         Receptacle   Occupant     Condition
    pcie1                          unknown      empty        unconfigured unknown
    pcie2                          unknown      empty        unconfigured unknown
    pcie3                          unknown      empty        unconfigured unknown
    pcie4                          unknown      empty        unconfigured unknown
    pcie5                          pci-pci/hp   connected    configured   ok
    pcie6                          unknown      disconnected unconfigured unknown

    Note - The auto-configuration method can be enabled or disabled at boot, depending on the platform implementation. Set the auto-configuration method as appropriate for your environment.


How to Add a PCI Adapter Card

The following procedure has been updated for adding a PCIe adapter card. However, the procedure to add an adapter card is the same whether you are using PCI or PCIe.

  1. Become superuser.
  2. Identify the hot-pluggable slot and open latches.

    For example, pcie3.

    # cfgadm pci
    Ap_Id                          Type         Receptacle   Occupant     Condition
    pcie1                          unknown      empty        unconfigured unknown
    pcie2                          unknown      empty        unconfigured unknown
    pcie3                          unknown      empty        unconfigured unknown
    pcie4                          unknown      empty        unconfigured unknown
    pcie5                          pci-pci/hp   connected    configured   ok
    pcie6                          unknown      disconnected unconfigured unknown 
  3. Follow the appropriate instructions in your platform guide to insert a PCI adapter card into the slot.
  4. Determine which slot the PCI adapter card is in after it is inserted.

    For example:

    # cfgadm pci
    Ap_Id                          Type         Receptacle   Occupant     Condition
    pcie1                          unknown      empty        unconfigured unknown
    pcie2                          unknown      empty        unconfigured unknown
    pcie3                          unknown      disconnected unconfigured unknown
    pcie4                          unknown      empty        unconfigured unknown
    pcie5                          pci-pci/hp   connected    configured   ok
    pcie6                          unknown      disconnected unconfigured unknown 
  5. Connect the power to the slot manually using the cfgadm command. Or, if you have a PCIe adapter card, use the auto-configuration method, such as pressing the slot's Attention Button as defined by your platform guide.

    For example:

    # cfgadm -c connect pcie3
  6. Confirm that the attachment point is connected.

    For example:

    # cfgadm pci
    Ap_Id                          Type         Receptacle   Occupant     Condition
    pcie1                          unknown      empty        unconfigured unknown
    pcie2                          unknown      empty        unconfigured unknown
    pcie3                          unknown      connected    unconfigured unknown
    pcie4                          unknown      empty        unconfigured unknown
    pcie5                          pci-pci/hp   connected    configured   ok
    pcie6                          unknown      disconnected unconfigured unknown
  7. Configure the PCI adapter card manually by using the cfgadm command as shown below. If using the auto-configuration method, this step should not be necessary. Refer to your platform guide for more information.

    For example:

    # cfgadm -c configure pcie3
  8. Verify the configuration of the PCI adapter card in the slot.

    For example:

    # cfgadm pci
    Ap_Id                          Type         Receptacle   Occupant     Condition
    pcie1                          unknown      empty        unconfigured unknown
    pcie2                          unknown      empty        unconfigured unknown
    pcie3                          etherne/hp   connected    configured unknown
    pcie5                          pci-pci/hp   connected    configured   ok
    pcie6                          unknown      disconnected 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.


    Note - The auto-configuration method can be enabled or disabled at boot, depending on the platform implementation. Set the auto-configuration method as appropriate for your environment.


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.

Previous Next

 
 
  Published under the terms fo the Public Documentation License Version 1.01. Design by Interspire