SCSI_HBA_IPORT_EXIST(9F) Kernel Functions for Drivers
scsi_hba_iport_exist, scsi_hba_iport_find - find and check if an iport
exists
#include <sys/scsi/scsi.h>
int
scsi_hba_iport_exist(dev_info_t *dip);
dev_info_t *
scsi_hba_iport_find(dev_info_t *dip, char *ua);
Evolving - This interface is still evolving in illumos. API and ABI
stability is not guaranteed.
dip Pointer to dev_info structure.
ua The unit address of the iport being searched for.
The scsi_hba_iport_exists() function is used to determine whether or
not dip has any child devices that are iports which have been added
through scsi_hba_iport_register(9F) or scsi_hba_iportmap_iport_add(9F).
For more information on iports, see iport(9).
The scsi_hba_iport_find() function attempts to find a child iport and
return its dev_info structure if it exists. The iport is searched for
by its unit address, which is passed in the ua argument. The unit
address for an iport is established when the iport is created.
The scsi_hba_iport_exist() and scsi_hba_iport_find() functions may be
called in either user or kernel context.
The scsi_hba_iport_exists() function returns 1 when there is a child
iport of dip. Otherwise, it returns 0.
The scsi_hba_iport_find() function returns a pointer to the iport's
dev_info structure, if found. Otherwise, NULL is returned.
iport(9), iportmap(9), scsi_hba_iport_register(9F),
scsi_hba_iportmap_iport_add(9F)
illumos April 18, 2017 illumos
NAME
scsi_hba_iport_exist, scsi_hba_iport_find - find and check if an iport
exists
SYNOPSIS
#include <sys/scsi/scsi.h>
int
scsi_hba_iport_exist(dev_info_t *dip);
dev_info_t *
scsi_hba_iport_find(dev_info_t *dip, char *ua);
INTERFACE LEVEL
Evolving - This interface is still evolving in illumos. API and ABI
stability is not guaranteed.
PARAMETERS
dip Pointer to dev_info structure.
ua The unit address of the iport being searched for.
DESCRIPTION
The scsi_hba_iport_exists() function is used to determine whether or
not dip has any child devices that are iports which have been added
through scsi_hba_iport_register(9F) or scsi_hba_iportmap_iport_add(9F).
For more information on iports, see iport(9).
The scsi_hba_iport_find() function attempts to find a child iport and
return its dev_info structure if it exists. The iport is searched for
by its unit address, which is passed in the ua argument. The unit
address for an iport is established when the iport is created.
CONTEXT
The scsi_hba_iport_exist() and scsi_hba_iport_find() functions may be
called in either user or kernel context.
RETURN VALUES
The scsi_hba_iport_exists() function returns 1 when there is a child
iport of dip. Otherwise, it returns 0.
The scsi_hba_iport_find() function returns a pointer to the iport's
dev_info structure, if found. Otherwise, NULL is returned.
SEE ALSO
iport(9), iportmap(9), scsi_hba_iport_register(9F),
scsi_hba_iportmap_iport_add(9F)
illumos April 18, 2017 illumos