]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
scsi: scsi_error: Add comments to scsi_check_sense()
authorDamien Le Moal <dlemoal@kernel.org>
Fri, 28 Feb 2025 03:17:51 +0000 (12:17 +0900)
committerMartin K. Petersen <martin.petersen@oracle.com>
Tue, 4 Mar 2025 03:11:47 +0000 (22:11 -0500)
Add a comment block describing the COMPLETED case with ASC/ASCQ 0x55/0xA
to mention that it relates to command duration limits very special
policy 0xD command completion.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Link: https://lore.kernel.org/r/20250228031751.12083-1-dlemoal@kernel.org
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_error.c

index ec60e8a96b11253e146f8be1f80cd22762def1c7..376b8897ab90a41d015e40af1e2b618469b88a29 100644 (file)
@@ -723,6 +723,13 @@ enum scsi_disposition scsi_check_sense(struct scsi_cmnd *scmd)
                return SUCCESS;
 
        case COMPLETED:
+               /*
+                * A command using command duration limits (CDL) with a
+                * descriptor set with policy 0xD may be completed with success
+                * and the sense data DATA CURRENTLY UNAVAILABLE, indicating
+                * that the command was in fact aborted because it exceeded its
+                * duration limit. Never retry these commands.
+                */
                if (sshdr.asc == 0x55 && sshdr.ascq == 0x0a) {
                        set_scsi_ml_byte(scmd, SCSIML_STAT_DL_TIMEOUT);
                        req->cmd_flags |= REQ_FAILFAST_DEV;