You can use the hotplug command with PCI Express (PCIe) and PCI SHPC devices to manage hot pluggable connections only. A connection can be a connector or port. 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 take a device, including an on-board device, online or offline without physically adding or removing the device from the system.
The hotplug service must be enabled to manage devices with the hotplug command. Except on sun4v platforms, the service is disabled by default on most platforms. To enable the hotplug service, type the following command:
# svcadm enable svc:/system/hotplug:default
The following examples show different uses of the hotplug command:
Displaying all the system's PCI/PCIe hot-pluggable connectors or ports. These ports can be virtual or physical.
# hotplug list -lv
Configuring or unconfiguring PCI/PCIe devices.
Use one of the following commands:
hotplug enable path connector
hotplug disable path connector
The following example configures an Ethernet card in a PCIe slot.
# hotplug enable /pci0,0 pcie0
Attaching or detaching the device driver for a PCI device node.
Use one of the following commands:
hotplug online path port
hotplug offline path port
The following example detaches the device driver for a PCI device node to take it offline.
# hotplug offline /pci0,0/pci1 pci.0,2
Installing or uninstalling services that can be supported by the drivers of the device on a specific port
Use one of the following commands:
hotplug install path port
hotplug uninstall path port
The following example installs dependent ports of an IOV physical function.
# hotplug install /pci@400/pci@1/pci@0/pci@4 pci.0,1
Showing information about all connectors, ports, and their associated devices in verbose mode
# hotplug list -v path connection
The following example displays IOV virtual functions that were probed after the installation operation illustrated in the previous example.
# hotplug list -v /pci@400/pci@1/pci@0/pci@4 pci.0,1 <pci.0,1> (ONLINE) { IOV physical function } { IOV virtual function 'pci.0,81' } { IOV virtual function 'pci.0,83' } { IOV virtual function 'pci.0,85' } { IOV virtual function 'pci.0,87' } <pci.0,81> (OFFLINE) ethernet@0,81 <pci.0,83> (OFFLINE) ethernet@0,83 <pci.0,85> (OFFLINE) ethernet@0,85 <pci.0,87> (OFFLINE) ethernet@0,87
This section describes error messages that indicate problems while you are performing PCI hot-plug operations, and possible solutions.
/pci@0,0/pci10de,5d@e <pci.a,1> (MAINTENANCE) . . ./pci@0,0/pci108e,534a@d <pci.0,0> (MAINTENANCE-SUSPENDED)
Cause: These messages indicate that a fault event or a maintenance operation occurred. The MAINTENANCE states mean that a device in use is not fully operational. The MAINTENANCE-SUSPENDED state means that the device is live suspended due to a maintenance operation such as the reconfiguration of a device hardware.
ERROR: hotplug service is not available.
Cause: The hotplug service is disabled.
Solution: Enable the hotplug service.
# svcadm enable svc:/system/hotplug:default
ERROR: there are no connections to display. (See hotplug(8) for more information.)
Cause: Either the system does not have any supported I/O buses or the system might have other hot-pluggable I/O devices but you need to use the cfgadm command rather than the hotplug command to manage them.
# hotplug poweroff /pci@13c/pci@1/SYS/RCSA/PCIE11 ERROR: devices or resources are busy.
Cause: Attempting to offline a port with dependent devices that are currently in use by the system might fail.
Solution: Retry to offline the port using the hotplug poweroff command after two minutes until the active holds are released.
# hotplug uninstall /pci@400/pci@1/pci@0/pci@4 pci.0,0 ERROR: devices or resources are busy. ethernet@0,81: ...
Cause: Attempting to uninstall dependent ports of an IOV physical function while a dependent IOV virtual function is busy.