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 - 29This interface is still evolving in illumos. 30API and ABI stability is 31not guaranteed. 32.Sh PARAMETERS 33.Bl -tag -width Fa 34.It Fa dip 35Pointer to 36.Vt dev_info 37structure. 38.It Fa port 39The name of the iport to add. 40.El 41.Sh DESCRIPTION 42The 43.Fn scsi_hba_iport_register 44function is used to create a new iport. 45For more information on iports and their uses, see 46.Xr iport 9 . 47This interface is generally used then there are a fixed, static set of 48iports that exist in the system. 49If the set of iports is dynamic or related to phys coming online and 50offline, then the driver should instead consider using the 51.Xr iportmap 9 52abstraction. 53.Pp 54The iport will be created as a child of the device represented by 55.Fa dip . 56The iport will be bound to the same driver. 57To distinguish nodes, the driver should use the 58.Xr scsi_hba_iport_unit_address 9F 59function. 60.Pp 61The name of the iport, specified by 62.Fa port , 63must be unique for a given parent. 64The iport will not be created if the name is already in use. 65While names generally are based on unit addresses, they may be synthetic 66names. 67.Sh CONTEXT 68The 69.Fn scsi_hba_iport_register 70function is generally called during the 71.Xr attach 9E 72entry point and may be called from 73.Sy user 74or 75.Sy kernel 76context. 77.Sh RETURN VALUES 78Upon successful completion, the 79.Fn scsi_hba_iport_register 80function returns 81.Dv DDI_SUCCESS . 82Otherwise, 83.Dv DDI_FAILURE 84is returned. 85.Sh SEE ALSO 86.Xr iport 9 , 87.Xr iportmap 9 , 88.Xr scsi_hba_iportmap_iport_add 9F 89