SCSI CHECK CONDITION
CHECK CONDITION is a SCSI command status used to report a condition described by sense information.
The status is 02h, distinct from the sense key. It does not by itself identify a defective drive: an unsupported request, changed device state or access restriction can also cause a report. [1] iSCSI carries sense data with this status using Autosense; do not assume that every transport requires a separate REQUEST SENSE command. [2]
For Linux SG_IO, a successful system call does not replace checking the returned SCSI and host status. The residual byte count and the amount of sense data are separate observations. [5]
Status versus payload: Linux v6.12 target emulation can return Unit Attention in a REQUEST SENSE payload while completing that request with GOOD status. Therefore sense data is not restricted to CHECK CONDITION responses. [6]
Relations
- related
- SCSI, SCSI sense key, Additional sense code, Additional sense code qualifier, SG_IO residual count, SCSI TASK ABORTED, SCSI ABORTED COMMAND, SCSI sense data, SCSI Unit Attention
Citations
- Seagate SCSI Commands Reference, Rev. H, sections 2.4.1.3-2.4.1.5
- RFC 7143: SCSI concepts and iSCSI transport; sections 4.1, 4.2 and 11.4.7
- Linux v6.12: scsi_complete_sghdr_rq and sg_io in scsi_ioctl.c
- Linux v6.12 target: spc_emulate_request_sense