Move everything from /var/adm to /var/log
[unleashed.git] / share / man / man9f / scsi_hba_iport_register.9f
blob085c88f3a017a1c4a22976edae77c8f7261a1c0c
1 .\"
2 .\" This file and its contents are supplied under the terms of the
3 .\" Common Development and Distribution License ("CDDL"), version 1.0.
4 .\" You may only use this file in accordance with the terms of version
5 .\" 1.0 of the CDDL.
6 .\"
7 .\" A full copy of the text of the CDDL should have accompanied this
8 .\" source.  A copy of the CDDL is also available via the Internet at
9 .\" http://www.illumos.org/license/CDDL.
10 .\"
11 .\"
12 .\" Copyright (c) 2017, Joyent, Inc.
13 .\"
14 .Dd Apr 18, 2017
15 .Dt SCSI_HBA_IPORT_REGISTER 9F
16 .Os
17 .Sh NAME
18 .Nm scsi_hba_iport_register
19 .Nd register a new iport
20 .Sh SYNOPSIS
21 .In sys/scsi/scsi.h
22 .Ft int
23 .Fo scsi_hba_iport_register
24 .Fa "dev_info_t *dip"
25 .Fa "char *port"
26 .Fc
27 .Sh INTERFACE LEVEL
28 .Sy Evolving -
29 This interface is still evolving in illumos.
30 API and ABI stability is
31 not guaranteed.
32 .Sh PARAMETERS
33 .Bl -tag -width Fa
34 .It Fa dip
35 Pointer to
36 .Vt dev_info
37 structure.
38 .It Fa port
39 The name of the iport to add.
40 .El
41 .Sh DESCRIPTION
42 The
43 .Fn scsi_hba_iport_register
44 function is used to create a new iport.
45 For more information on iports and their uses, see
46 .Xr iport 9 .
47 This interface is generally used then there are a fixed, static set of
48 iports that exist in the system.
49 If the set of iports is dynamic or related to phys coming online and
50 offline, then the driver should instead consider using the
51 .Xr iportmap 9
52 abstraction.
53 .Pp
54 The iport will be created as a child of the device represented by
55 .Fa dip .
56 The iport will be bound to the same driver.
57 To distinguish nodes, the driver should use the
58 .Xr scsi_hba_iport_unit_address 9F
59 function.
60 .Pp
61 The name of the iport, specified by
62 .Fa port ,
63 must be unique for a given parent.
64 The iport will not be created if the name is already in use.
65 While names generally are based on unit addresses, they may be synthetic
66 names.
67 .Sh CONTEXT
68 The
69 .Fn scsi_hba_iport_register
70 function is generally called during the
71 .Xr attach 9E
72 entry point and may be called from
73 .Sy user
75 .Sy kernel
76 context.
77 .Sh RETURN VALUES
78 Upon successful completion, the
79 .Fn scsi_hba_iport_register
80 function returns
81 .Dv DDI_SUCCESS .
82 Otherwise,
83 .Dv DDI_FAILURE
84 is returned.
85 .Sh SEE ALSO
86 .Xr iport 9 ,
87 .Xr iportmap 9 ,
88 .Xr scsi_hba_iportmap_iport_add 9F