xref: /illumos-gate/usr/src/man/man8/hotplug.8 (revision bbf21555)
148d68e1cSJohn Levon.\"
248d68e1cSJohn Levon.\" The contents of this file are subject to the terms of the
348d68e1cSJohn Levon.\" Common Development and Distribution License (the "License").
448d68e1cSJohn Levon.\" You may not use this file except in compliance with the License.
548d68e1cSJohn Levon.\"
648d68e1cSJohn Levon.\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
748d68e1cSJohn Levon.\" or http://www.opensolaris.org/os/licensing.
848d68e1cSJohn Levon.\" See the License for the specific language governing permissions
948d68e1cSJohn Levon.\" and limitations under the License.
1048d68e1cSJohn Levon.\"
1148d68e1cSJohn Levon.\" When distributing Covered Code, include this CDDL HEADER in each
1248d68e1cSJohn Levon.\" file and include the License file at usr/src/OPENSOLARIS.LICENSE.
1348d68e1cSJohn Levon.\" If applicable, add the following below this CDDL HEADER, with the
1448d68e1cSJohn Levon.\" fields enclosed by brackets "[]" replaced with your own identifying
1548d68e1cSJohn Levon.\" information: Portions Copyright [yyyy] [name of copyright owner]
1648d68e1cSJohn Levon.\"
1748d68e1cSJohn Levon.\"
1848d68e1cSJohn Levon.\" Copyright (c) 2010, Sun Microsystems, Inc. All Rights Reserved
1948d68e1cSJohn Levon.\" Copyright 2020 Joyent, Inc.
2048d68e1cSJohn Levon.\"
2148d68e1cSJohn Levon.Dd March 2, 2020
22*bbf21555SRichard Lowe.Dt HOTPLUG 8
2348d68e1cSJohn Levon.Os
2448d68e1cSJohn Levon.Sh NAME
2548d68e1cSJohn Levon.Nm hotplug
2648d68e1cSJohn Levon.Nd configure hotplug connectors and ports
2748d68e1cSJohn Levon.Sh SYNOPSIS
2848d68e1cSJohn Levon.Nm
2948d68e1cSJohn Levon.Fl \&?
3048d68e1cSJohn Levon.Nm
3148d68e1cSJohn Levon.Cm list
3248d68e1cSJohn Levon.Op Fl lv
3348d68e1cSJohn Levon.Op Ar path
3448d68e1cSJohn Levon.Op Ar connection
3548d68e1cSJohn Levon.Nm
3648d68e1cSJohn Levon.Cm online
3748d68e1cSJohn Levon.Ar path
3848d68e1cSJohn Levon.Ar port
3948d68e1cSJohn Levon.Nm
4048d68e1cSJohn Levon.Cm offline
4148d68e1cSJohn Levon.Op Fl fq
4248d68e1cSJohn Levon.Ar path
4348d68e1cSJohn Levon.Ar port
4448d68e1cSJohn Levon.Nm
4548d68e1cSJohn Levon.Cm enable
4648d68e1cSJohn Levon.Ar path
4748d68e1cSJohn Levon.Ar connector
4848d68e1cSJohn Levon.Nm
4948d68e1cSJohn Levon.Cm disable
5048d68e1cSJohn Levon.Op Fl fq
5148d68e1cSJohn Levon.Ar path
5248d68e1cSJohn Levon.Ar connector
5348d68e1cSJohn Levon.Nm
5448d68e1cSJohn Levon.Cm poweron
5548d68e1cSJohn Levon.Ar path
5648d68e1cSJohn Levon.Ar connector
5748d68e1cSJohn Levon.Nm
5848d68e1cSJohn Levon.Cm poweroff
5948d68e1cSJohn Levon.Op Fl fq
6048d68e1cSJohn Levon.Ar path
6148d68e1cSJohn Levon.Ar connector
6248d68e1cSJohn Levon.Nm
6348d68e1cSJohn Levon.Cm set
6448d68e1cSJohn Levon.Fl o Ar options
6548d68e1cSJohn Levon.Ar path
6648d68e1cSJohn Levon.Ar connector
6748d68e1cSJohn Levon.Nm
6848d68e1cSJohn Levon.Cm get
6948d68e1cSJohn Levon.Fl o Ar options
7048d68e1cSJohn Levon.Ar path
7148d68e1cSJohn Levon.Ar connector
7248d68e1cSJohn Levon.Sh DESCRIPTION
7348d68e1cSJohn LevonThe
7448d68e1cSJohn Levon.Nm
7548d68e1cSJohn Levoncommand is used to manage hotplug connections.
7648d68e1cSJohn LevonA connection can be a connector or port.
7748d68e1cSJohn LevonA hotplug connector is a representation of a physical point in the system where
7848d68e1cSJohn Levoncomponents can be inserted or removed.
7948d68e1cSJohn LevonA hotplug port is a representation of a logical point in the system device tree
8048d68e1cSJohn Levonwhere the connection of a device to the system is managed.
8148d68e1cSJohn Levon.Pp
8248d68e1cSJohn LevonThe
8348d68e1cSJohn Levon.Nm
8448d68e1cSJohn Levoncommand only supports hotplug operations on hotplug connectors for PCI Express
8548d68e1cSJohn Levonbuses and PCI buses that implement the Standard PCI Hotplug feature.
8648d68e1cSJohn LevonHotplug ports on PCI Express and PCI buses in systems with PCI Express fabrics
8748d68e1cSJohn Levonare also supported.
8848d68e1cSJohn LevonAdditional buses may be supported in the future.
8948d68e1cSJohn Levon.Pp
9048d68e1cSJohn LevonThe
9148d68e1cSJohn Levon.Nm
9248d68e1cSJohn Levoncommand operates on the following kinds of objects:
9348d68e1cSJohn Levon.Bl -tag -width "connection"
9448d68e1cSJohn Levon.It Cm path
9548d68e1cSJohn LevonHotplug connectors and ports are integrated into the system device tree.
9648d68e1cSJohn LevonThe names of connectors and ports are unique relative only to their bus
9748d68e1cSJohn Levoncontroller.
9848d68e1cSJohn LevonA device path is required to uniquely reference a connector or port.
9948d68e1cSJohn Levon.It Cm connector
10048d68e1cSJohn LevonIf a hardware component supports being physically inserted or removed, then a
10148d68e1cSJohn Levonhotplug connector represents the location where this action may occur.
10248d68e1cSJohn LevonWhen a connector exists, it has a hierarchy of ports and device nodes that
10348d68e1cSJohn Levondepend upon it.
10448d68e1cSJohn Levon.It Cm port
10548d68e1cSJohn LevonAll device nodes can be virtually hotplugged, even if their hardware does not
10648d68e1cSJohn Levonsupport physical hotplugging.
10748d68e1cSJohn LevonA hotplug port exists between a device node and its parent node in the system
10848d68e1cSJohn Levondevice tree.
10948d68e1cSJohn LevonIt represents the location where the device node and its dependents can be
11048d68e1cSJohn Levonmanaged.
11148d68e1cSJohn Levon.It Cm connection
11248d68e1cSJohn LevonA hotplug connection is a generic term to refer to either a hotplug connector or
11348d68e1cSJohn Levona hotplug port.
11448d68e1cSJohn Levon.El
11548d68e1cSJohn Levon.Pp
11648d68e1cSJohn LevonHotplug connectors and ports are managed according to a state model.
11748d68e1cSJohn LevonThe
11848d68e1cSJohn Levon.Nm
11948d68e1cSJohn Levoncommand can list information about the hotplug connections in a system, or it
12048d68e1cSJohn Levoncan initiate change of state operations on specific hotplug connections.
12148d68e1cSJohn Levon.Pp
12248d68e1cSJohn LevonHotplug connectors can be in the following states:
12348d68e1cSJohn Levon.Bl -tag -width "present"
12448d68e1cSJohn Levon.It Cm empty
12548d68e1cSJohn LevonA component is not physically inserted in the connector.
12648d68e1cSJohn Levon.It Cm present
12748d68e1cSJohn LevonA component is physically inserted in the connector, but the component is
12848d68e1cSJohn Levonpowered off.
12948d68e1cSJohn LevonThe component is not in use.
13048d68e1cSJohn Levon.It Cm powered
13148d68e1cSJohn LevonA component is physically inserted in the connector, and the component is
13248d68e1cSJohn Levonpowered on.
13348d68e1cSJohn LevonThe component is disabled and is not in use.
13448d68e1cSJohn Levon.It Cm enabled
13548d68e1cSJohn LevonA component is physically inserted in the connector.
13648d68e1cSJohn LevonThe component is powered on and has been probed and tested.
13748d68e1cSJohn LevonThe component is enabled and devices that represent its functions can be used.
13848d68e1cSJohn Levon.El
13948d68e1cSJohn Levon.Pp
14048d68e1cSJohn LevonHotplug ports can be in the following states:
14148d68e1cSJohn Levon.Bl -tag -width "port-present"
14248d68e1cSJohn Levon.It Cm port-empty
14348d68e1cSJohn LevonNo device exists for the hotplug port.
14448d68e1cSJohn Levon.It Cm port-present
14548d68e1cSJohn LevonA device exists for the hotplug port, but the device has not been probed and it
14648d68e1cSJohn Levonhas no attached device driver.
14748d68e1cSJohn LevonThe device is not in use.
14848d68e1cSJohn Levon.It Cm offline
14948d68e1cSJohn LevonA device exists for the hotplug port, and the device has been probed.
15048d68e1cSJohn LevonA device driver is not attached, and the device is not in use.
15148d68e1cSJohn Levon.It Cm online
15248d68e1cSJohn LevonA device exists for the hotplug port, and its device driver is fully attached.
15348d68e1cSJohn LevonThe device is in use.
15448d68e1cSJohn Levon.It Cm maintenance
15548d68e1cSJohn LevonA device exists for the hotplug port, and its device driver is fully attached.
15648d68e1cSJohn LevonThe device is in use, but not fully operational.
15748d68e1cSJohn LevonA maintenance or fault management operation is affecting the device.
15848d68e1cSJohn Levon.El
15948d68e1cSJohn Levon.Pp
16048d68e1cSJohn LevonThe
16148d68e1cSJohn Levon.Nm
16248d68e1cSJohn Levoncommand can also access bus private properties for each hotplug connector.
16348d68e1cSJohn LevonThe current values of bus private properties can be displayed.
16448d68e1cSJohn LevonNew values for each bus private property can be set directly.
16548d68e1cSJohn Levon.Sh EXIT STATUS
16648d68e1cSJohn Levon.Bl -diag
16748d68e1cSJohn Levon.It 0
16848d68e1cSJohn LevonSuccessful completion.
16948d68e1cSJohn Levon.It 1
17048d68e1cSJohn LevonInvalid command line options were specified.
17148d68e1cSJohn Levon.It 2
17248d68e1cSJohn LevonThe specified path or connection does not exist.
17348d68e1cSJohn Levon.It 3
17448d68e1cSJohn LevonA fatal error occurred.
17548d68e1cSJohn LevonOne or more error messages are displayed on standard error.
17648d68e1cSJohn Levon.It 4
17748d68e1cSJohn LevonThe hotplug service is not available.
17848d68e1cSJohn Levon.El
17948d68e1cSJohn Levon.Sh EXAMPLES
18048d68e1cSJohn Levon.Bl -tag -width 0n
18148d68e1cSJohn Levon.It Sy Example 1 No Showing All Hotplug Connections
18248d68e1cSJohn LevonThe following command shows all hotplug connections:
18348d68e1cSJohn Levon.Bd -literal
18448d68e1cSJohn Levon# hotplug list -v
18548d68e1cSJohn Levonpci@0,0
18648d68e1cSJohn Levon        <pci.2,1> (ONLINE)
18748d68e1cSJohn Levon         pci108e,534a@2,1
18848d68e1cSJohn Levon                 [pci30] (EMPTY)
18948d68e1cSJohn Levon        <pci.e,0> (ONLINE)
19048d68e1cSJohn Levon         pci10de,5d@e
19148d68e1cSJohn Levon                 <pci.b,0> (ONLINE)
19248d68e1cSJohn Levon                 display@b
19348d68e1cSJohn Levon                 [NEM0] (ENABLED)
19448d68e1cSJohn Levon                 <pci.a,0> (ONLINE)
19548d68e1cSJohn Levon                 pci108e,534a@a,0
19648d68e1cSJohn Levon                         { Network interface nge0 }
19748d68e1cSJohn Levon                         { nge0: hosts IP addresses: 10.0.0.1 }
19848d68e1cSJohn Levon                 <pci.a,1> (MAINTENANCE)
19948d68e1cSJohn Levon                 pci108e,534a@a,1
20048d68e1cSJohn Levon                 [NEM1] (EMPTY)
20148d68e1cSJohn Levon         <pci.c,0> (OFFLINE)
20248d68e1cSJohn Levon                pci108e,534a@4
20348d68e1cSJohn Levon.Ed
20448d68e1cSJohn Levon.Pp
20548d68e1cSJohn LevonTo show the full paths of hotplug connections and devices, enter the following
20648d68e1cSJohn Levoncommand:
20748d68e1cSJohn Levon.Bd -literal
20848d68e1cSJohn Levon# hotplug list -l
20948d68e1cSJohn Levon/pci@0,0 <pci.2,1> (ONLINE)
21048d68e1cSJohn Levon/pci@0,0/pci108e,534a@2,1 [pci30] (EMPTY)
21148d68e1cSJohn Levon/pci@0,0 pci.e,0> (ONLINE)
21248d68e1cSJohn Levon/pci@0,0/pci10de,5d@e <pci.b,0> (ONLINE)
21348d68e1cSJohn Levon/pci@0,0/pci10de,5d@e/display@b
21448d68e1cSJohn Levon/pci@0,0/pci10de,5d@e [NEM0] (ENABLED)
21548d68e1cSJohn Levon/pci@0,0/pci10de,5d@e <pci.a,0> (ONLINE)
21648d68e1cSJohn Levon/pci@0,0/pci10de,5d@e/pci108e,534a@a,0
21748d68e1cSJohn Levon/pci@0,0/pci10de,5d@e <pci.a,1> (MAINTENANCE)
21848d68e1cSJohn Levon/pci@0,0/pci10de,5d@e/pci108e,534a@a,0
21948d68e1cSJohn Levon/pci@0,0/pci10de,5d@e [NEM1] (EMPTY)
22048d68e1cSJohn Levon/pci@0,0 pci.c,0> (OFFLINE)
22148d68e1cSJohn Levon/pci@0,0/pci108e,534a@4
22248d68e1cSJohn Levon.Ed
22348d68e1cSJohn Levon.It Sy Example 2 No Reporting Failure During State Change Operation
22448d68e1cSJohn LevonIf a change of state operation fails, an explanation is displayed to describe
22548d68e1cSJohn Levonthe failure.
22648d68e1cSJohn LevonAn attempt to offline a hotplug port with dependent devices that are currently
22748d68e1cSJohn Levonin use by the system might fail as follows:
22848d68e1cSJohn Levon.Bd -literal
22948d68e1cSJohn Levon# hotplug offline /pci@0,0/pci10de,5d@e pci.a,0
23048d68e1cSJohn LevonERROR: devices or resources are busy.
23148d68e1cSJohn Levonpci108e,534a@a,0:
23248d68e1cSJohn Levon    { Network interface nge0 }
23348d68e1cSJohn Levon    { nge0: hosts IP addresses: 10.0.0.1 }
23448d68e1cSJohn Levon    { Plumbed IP Address }
23548d68e1cSJohn Levon.Ed
23648d68e1cSJohn Levon.It Sy Example 3 No Displaying Bus-Specific Properties and Values
23748d68e1cSJohn LevonThe following command displays all supported bus-specific properties and their
23848d68e1cSJohn Levonpossible values:
23948d68e1cSJohn Levon.Bd -literal
24048d68e1cSJohn Levon# hotplug get -o help /pci@0,0 pci.2,1
24148d68e1cSJohn Levonpower_led=<on|off|blink>
24248d68e1cSJohn Levonfault_led=<on|off|blink>
24348d68e1cSJohn Levonactive_led=<on|off|blink>
24448d68e1cSJohn Levonattn_led=<on|off|blink>
24548d68e1cSJohn Levoncard_type=<type description>
24648d68e1cSJohn Levonboard_type=<type description>
24748d68e1cSJohn Levon.Ed
24848d68e1cSJohn Levon.It Sy Example 4 Displaying Bus-Specific Options
24948d68e1cSJohn LevonThe following command displays the card type and the current state of the Power
25048d68e1cSJohn LevonLED of a PCI hotplug connector:
25148d68e1cSJohn Levon.Bd -literal
25248d68e1cSJohn Levon# hotplug get -o card_type,power_led /pci@0,0 pci.2,1
25348d68e1cSJohn Levoncard_type=fibre
25448d68e1cSJohn Levonpower_led=on
25548d68e1cSJohn Levon.Ed
25648d68e1cSJohn Levon.It Sy Example 5 No Setting a Bus-Specific Property
25748d68e1cSJohn LevonThe following command turns on the attention LED of a PCI hotplug connector:
25848d68e1cSJohn Levon.Bd -literal
25948d68e1cSJohn Levon# hotplug set -o attn_led=on /pci@0,0 pci.2,1
26048d68e1cSJohn Levon.Ed
26148d68e1cSJohn Levon.El
26248d68e1cSJohn Levon.Sh DIAGNOSTICS
26348d68e1cSJohn LevonThe following error message is displayed on systems that do not have any
26448d68e1cSJohn Levonsupported I/O buses:
26548d68e1cSJohn Levon.Bd -literal
26648d68e1cSJohn LevonERROR: there are no connections to display.
267*bbf21555SRichard Lowe(See hotplug(8) for more information.)
26848d68e1cSJohn Levon.Ed
26948d68e1cSJohn Levon.Pp
27048d68e1cSJohn LevonIf this error message is seen, note that the system might still have other I/O
27148d68e1cSJohn Levondevices that support hotplugging, through the
272*bbf21555SRichard Lowe.Xr cfgadm 8
27348d68e1cSJohn Levoncommand instead of
27448d68e1cSJohn Levon.Nm .
27548d68e1cSJohn Levon.Sh INTERFACE STABILITY
27648d68e1cSJohn Levon.Sy Committed
27748d68e1cSJohn Levon.Sh SEE ALSO
27848d68e1cSJohn Levon.Xr getsubopt 3C ,
279*bbf21555SRichard Lowe.Xr rcmscript 5 ,
280*bbf21555SRichard Lowe.Xr attributes 7 ,
281*bbf21555SRichard Lowe.Xr cfgadm 8 ,
282*bbf21555SRichard Lowe.Xr hotplugd 8
28348d68e1cSJohn Levon.Sh NOTES
28448d68e1cSJohn LevonThe
28548d68e1cSJohn Levon.Nm
28648d68e1cSJohn Levonservice
28748d68e1cSJohn Levon.Po FMRI
28848d68e1cSJohn Levon.Pa svc:/system/hotplug
28948d68e1cSJohn Levon.Pc
29048d68e1cSJohn Levonmust be enabled as a prerequisite for using the
29148d68e1cSJohn Levon.Nm
29248d68e1cSJohn Levoncommand.
29348d68e1cSJohn LevonSee
294*bbf21555SRichard Lowe.Xr hotplugd 8 .
29548d68e1cSJohn Levon.Pp
29648d68e1cSJohn LevonThe authorization
29748d68e1cSJohn Levon.Pa solaris.hotplug.modify
29848d68e1cSJohn Levonmust be granted in order to perform change-of-state operations.
29948d68e1cSJohn LevonAlternatively, the rights profile
30048d68e1cSJohn Levon.Qq Hotplug Management
30148d68e1cSJohn Levoncan be granted, which includes that authorization.
30248d68e1cSJohn Levon.Pp
30348d68e1cSJohn LevonVerbose usage information is gathered from the RCM framework.
30448d68e1cSJohn LevonIts format and content is subject to change.
30548d68e1cSJohn Levon.Pp
30648d68e1cSJohn LevonThe following bus specific properties are supported in PCI bus controllers:
30748d68e1cSJohn Levon.Bl -tag -width Ds
30848d68e1cSJohn Levon.It Cm power_led No \&| Cm fault_led No \&| Cm attn_led No \&| Cm active_led
30948d68e1cSJohn LevonStates of a specific LED of a slot.
31048d68e1cSJohn LevonThe value could be
31148d68e1cSJohn Levon.Cm on , off ,
31248d68e1cSJohn Levonor
31348d68e1cSJohn Levon.Cm blink .
31448d68e1cSJohn Levon.Pp
31548d68e1cSJohn LevonThey can all be used with
31648d68e1cSJohn Levon.Cm get
31748d68e1cSJohn Levonsubcommand, but only property
31848d68e1cSJohn Levon.Cm attn_led
31948d68e1cSJohn Levoncan be used with
32048d68e1cSJohn Levon.Cm set
32148d68e1cSJohn Levonsubcommand.
32248d68e1cSJohn Levon.It Cm card_type No \&| Cm board_type
32348d68e1cSJohn LevonType of a card or board of a slot.
32448d68e1cSJohn Levon.Pp
32548d68e1cSJohn LevonThey can all be used with
32648d68e1cSJohn Levon.Cm get
32748d68e1cSJohn Levonsubcommand, but neither can be used with
32848d68e1cSJohn Levon.Cm set
32948d68e1cSJohn Levonsubcommand.
33048d68e1cSJohn Levon.El
331