Writing Device Drivers

scsi_address Structure

The scsi_address(9S) structure provides transport and addressing information for each SCSI command that is allocated and transported by a target driver instance.

The scsi_address structure contains the following fields:

struct scsi_address {
    struct scsi_hba_tran    *a_hba_tran;    /* Transport vectors */
    ushort_t                a_target;       /* Target identifier */
    uchar_t                 a_lun;          /* LUN on that target */
    uchar_t                 a_sublun;       /* Sub LUN on that LUN */
                                            /* Not used */
};
a_hba_tran

Pointer to the scsi_hba_tran(9S) structure, as allocated and initialized by the HBA driver. If SCSI_HBA_TRAN_CLONE was specified as the flag to scsi_hba_attach_setup(9F), a_hba_tran points to a copy of that structure.

a_target

Identifies the SCSI target on the SCSI bus.

a_lun

Identifies the SCSI logical unit on the SCSI target.