System Administration Guide: Devices and File Systems

PCIe Hot-Plugging With the (hotplug) Command

You can use the hotplug command to manage hot pluggible connections, where a connection can be a connector or port, on PCI Express (PCIe) and PCI SHPC devices only. A hotplug connector is a physical representation in the system where a component is inserted or removed. A hotplug port is a logical representation in the system device tree where the connection of a device to the system is managed.

You can use the hotplug features to online or offline a device, even an on-board device, without physically adding or removing the device from the system.

You must enable the hotplug service to manage devices with the hotplug command.


# svcadm enable svc:/system/hotplug:default

The following examples describe how to use the hotplug command.

Display all the PCI/PCIe hot pluggible connectors/ports (virtual and physical) in the system as follows:


# hotplug list -lv

Configure an Ethernet card in a PCIe slot. For example:


# hotplug enable /pci0,0 pcie0

Unconfigure an Ethernet card in a PCIe slot. For example:


# hotplug disable /pci0,0 pcie0

Offline a PCI device node, which means detach the device driver for that node. For example:


# hotplug offline /pci0,0/pci1 pci.0,2

Online a PCI device node, which means attach the driver for that node. For example:


# hotplug online /pci0,0/pci1 pci.0,2

Troubleshooting PCI Hot Plug Operations (hotplug)

The following service must be running to use the hotplug command.


svc:/system/hotplug:default

Otherwise, you will see the following message:


ERROR: hotplug service is not available.

The following error message is displayed on systems that do not have any supported I/O buses:


ERROR: there are no connections to display.
       (See hotplug(1m) for more information.)

The above message could mean that the system might have other hot-pluggible I/O devices, but you need to use the cfgadm command rather than the hotplug command to manage these devices.