scsi_device(9S)
NAME
scsi_device − SCSI device structure
SYNOPSIS
#include <sys/scsi/scsi.h>
INTERFACE LEVEL
SPARC architecture specific (SPARC DDI).
DESCRIPTION
The scsi_device structure stores common information about each SCSI logical unit, including pointers to areas that contain both generic and device specific information. There is one scsi_device structure for each logical unit attached to the system.
STRUCTURE ELEMENTS
| struct scsi_address | sd_address; | /∗ target/lun address ∗/ |
| dev_info_t | ∗sd_dev; | /∗ Cross-reference to our dev_info_t ∗/ |
| kmutex_t | sd_mutex; | /∗ Mutex for this device ∗/ |
| struct scsi_inquiry | ∗sd_inq; | /∗ scsi_inquiry data structure ∗/ |
| struct scsi_extended_sense | ∗sd_sense; | /∗ extended request sense buffer ∗/ |
| caddr_t | sd_private; | /∗ Target drivers private data ∗/ |
sd_address contains the routing information that the target driver copies into a scsi_pkt(9S) structure. The SCSA library routines use this information to determine which host adapter and SCSI bus a command is intended for.
sd_dev is a pointer to the corresponding dev_info structure.
sd_mutex is a mutual exclusion lock for this device. It is be used to serialize uccess to a device. See mutex(9F).
sd_inq is initially NULL (zero). After executing scsi_slave(9F) this field contains the inquiry data associated with the particular device.
sd_sense is initially NULL (zero). After executing a REQUEST SENSE command, this field contains the sense information associated with the particular device.
sd_private is reserved for the use of target drivers and should generally be used to point to target specific data structures.
SEE ALSO
makecom(9F), mutex(9F), scsi_slave(9F), scsi_pkt(9S)
SunOS 5.1 Writing Device Drivers
SunOS 5.1 — Last change: 17 Sep 1992