SCSI_HBA_IPORT_REGISTER(9F) Kernel Functions for Drivers SCSI_HBA_IPORT_REGISTER(9F)

scsi_hba_iport_register
register a new iport

#include <sys/scsi/scsi.h>

int
scsi_hba_iport_register(dev_info_t *dip, char *port);

Evolving - This interface is still evolving in illumos. API and ABI stability is not guaranteed.

dip
Pointer to dev_info structure.
port
The name of the iport to add.

The scsi_hba_iport_register() function is used to create a new iport. For more information on iports and their uses, see iport(9). This interface is generally used then there are a fixed, static set of iports that exist in the system. If the set of iports is dynamic or related to phys coming online and offline, then the driver should instead consider using the iportmap(9) abstraction.

The iport will be created as a child of the device represented by dip. The iport will be bound to the same driver. To distinguish nodes, the driver should use the scsi_hba_iport_unit_address(9F) function.

The name of the iport, specified by port, must be unique for a given parent. The iport will not be created if the name is already in use. While names generally are based on unit addresses, they may be synthetic names.

The scsi_hba_iport_register() function is generally called during the attach(9E) entry point and may be called from user or kernel context.

Upon successful completion, the scsi_hba_iport_register() function returns DDI_SUCCESS. Otherwise, DDI_FAILURE is returned.

iport(9), iportmap(9), scsi_hba_iportmap_iport_add(9F)
April 18, 2017 OmniOS