Next | Prev | Up | Top | Contents | Index

Return Codes and Status Values

A zero return code in the ds_ret field signifies success. The possible nonzero return codes are summarized in Table 5-3 and are declared in sys/dsreq.h. Not all return codes are possible with every driver.

Return Codes From SCSI Operations
Constant NameMeaning
DSRT_DEVSCSIGeneral failure from SCSI driver.
DSRT_MULTGeneral software failure, typically a SCSI-bus request.
DSRT_CANCELOperation cancelled in host adapter driver.
DSRT_REVCODESoftware level mismatch, recompile application.
DSRT_AGAINTry again, recoverable SCSI-bus error.
DSRT_HOSTFailure reported by host adapter driver for the bus in use.
DSRT_NOSELNo unit responded to select.
DSRT_SHORTIncomplete transfer (not an error). See ds_datasent.
DSRT_OKNot returned at this time.
DSRT_SENSE Command returned with status; sense data successfully retrieved from SCSI host (see ds_sensesent).
DSRT_NOSENSECommand with status, error occurred while trying to get sense data from SCSI host.
DSRT_TIMEOUTCommand did not complete in the time allowed by ds_timeout.
DSRT_LONGData transfer overran bounds (ds_datalen).
DSRT_PROTOMiscellaneous protocol failure.
DSRT_EBSYBusy dropped unexpectedly; protocol error.
DSRT_REJECTMessage rejected; protocol error.
DSRT_PARITYParity error on SCSI bus; protocol error.
DSRT_MEMORYMemory error in system memory.
DSRT_CMDOProtocol error during command phase.
DSRT_STAIProtocol error during status phase.
DSRT_UNIMPLCommand not implemented; protocol error.

The possible SCSI status value in the ds_status field are summarized in Table 5-4.

SCSI Status Codes
Constant NameMeaning
STA_GOODThe target has successfully completed the SCSI command.
STA_CHECKAn error or exception was detected. Sense was attempted if DSRQ_SENSE was specified.
STA_BUSYCommand not attempted; addressed unit is busy.
STA_IGOODLinked SCSI command completed.
STA_RESERVCommand aborted because it tried to access a logical unit or an extent within a logical unit that reserves that type of access to another SCSI device.

The possible SCSI message byte values in the ds_msg field are summarized in Table 5-5.

SCSI Message Byte Values
Constant NameMeaning
MSG_COMPLCommand complete.
MSG_XMSGExtended message (only byte returned).
MSG_SAVEPInitiator should save data pointers.
MSG_RESTPInitiator restore data pointers.
MSG_DISCDisconnect.
MSG_IERRInitiator detected error.
MSG_ABORTAbort.
MSG_REJECTOptional message rejected, not supported.
MSG_NOOPEmpty message.
MSG_MPARITYParity error during Message In phase.
MSG_LINKLinked command complete.
MSG_LINKFLinked command complete with flag.
MSG_BRESETBus device reset.
MSG_IDENTValue 0x80, first of the 0x80-0xFF identifier messages.


Next | Prev | Up | Top | Contents | Index