scsi_rsp_t
Structure
The scsi_rsp_t
structure provides the SCSI response and status information.
typedef struct scsi_rsp { uint8_t rsp_tran_ret; /* scsi_transport(9F) return value */ uint8_t rsp_reason; /* value of pkt_reason */ uint8_t rsp_status; /* SCSI Status */ uint8_t rsp_sense_key; /* sense key */ uint8_t rsp_sense_asc; /* ASC */ uint8_t rsp_sense_ascq; /* ASCQ */ size_t rsp_resid; /* number of bytes not transferred */ uint64_t rsp_latency; /* latency of the SCSI command in nanoseconds */ } scsi_rsp_t
The scsi:::cmd-response
fires if one of the following conditions is true:
-
When you receive a response from the target device.
-
When the SCSI command fails to reach the target because of transport failure.
Values in the scsi_rsp_t
structure provide details on the failure or success of the SCSI command.
The rsp_tran_ret
member provides a return value of scsi_transport
(). The return values denote if the SCSI command was accepted by the SCSI transport. Values other than TRAN_ACCEPT
indicates that the SCSI command was not accepted and all other members of the structure scsi_rsp
were not set.
The rsp_reason
member denotes the SCSI command completion reason. The value of CMD_CMPLT
is set for a normal completion when the command has reached the target. Then the SCSI status is set by using the rsp_status
member. The value of the rsp_status
is not set for any other values of rsp_reason
. To know the value of TRAN_ACCEPT
and CMD_CMPLT
, see the scsi_pkt.h
file. For more information, see scsi_pkt
(9S).