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