Kernel Functions for Drivers scsi_address_device(9F) NAME scsi_address_device - return scsi_device(9S) pointer given scsi_address(9S) pointer. SYNOPSIS #include struct scsi_device *scsi_address_device(struct scsi_address *ap); INTERFACE LEVEL Solaris DDI specific (Solaris DDI). PARAMETERS ap Pointer to a scsi_address(9S) structure. DESCRIPTION The scsi_address_device() routine returns a pointer to a scsi_device(9S) structure associated with the specified scsi_address(9S) structure. This function can only be used by an host adaptor driver that calls scsi_hba_attach_setup(9F) with SCSI_HBA_ADDR_COMPLEX. The ability to determine the scsi_device(9S) associated with a scsi_address(9S) allows, for example, a host adaptor driver's tran_start(9E) implementation, which only has access to a scsi_address(9S) pointer, to gain access to per-scsi_device(9S) host adaptor driver private data. Given the scsi_device(9S) structure pointer returned by scsi_address_device(9F), the per-scsi_device(9S) host adaptor private data can be obtained by calling scsi_hba_device_private_get(9F). The host adaptor driver establishes its per-scsi_device(9S) host adaptor driver private data pointer during tran_tgt_init(9E) by calling scsi_hba_device_private_set(9F). RETURN VALUE Returns a pointer to a scsi_device(9S) structure associated with the specified scsi_address(9S), or NULL. CONTEXT This routine can be called from any context. EXAMPLES Example 1 SEE ALSO scsi_hba_attach_setup(9F), scsi_address(9S), scsi_device(9S), scsi_device_hba_private_get(9F), scsi_hba_device_private_set(9F), tran_tgt_init(9E). ANSI Small Computer System Interface-2 (SCSI-2)