summaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorBart Van Assche <bvanassche@acm.org>2025-11-13 10:17:30 -0800
committerMartin K. Petersen <martin.petersen@oracle.com>2025-12-16 22:20:26 -0500
commit0f9c4be787f786cff0bf2183607e54a552a40cb2 (patch)
tree00cb9edb2e8b4ed86a2234ce6b636aa0c339a28d /include/scsi
parentc6e9ddc099d0d302eb73e8c63ce89f0d4da1f475 (diff)
scsi: core: Introduce an enumeration type for the SCSI_MLQUEUE constants
Multiple functions in the SCSI core accept an 'int reason' argument. The 'int' type of these arguments doesn't make it clear what values are acceptable for these arguments. Document which values are supported for these arguments by introducing the enumeration type scsi_qc_status. 'qc' in the type name stands for 'queuecommand' since the values passed as the 'reason' argument are the .queuecommand() return values. Cc: John Garry <john.g.garry@oracle.com> Cc: Hannes Reinecke <hare@suse.de> Signed-off-by: Bart Van Assche <bvanassche@acm.org> Link: https://patch.msgid.link/20251113181730.1109331-1-bvanassche@acm.org Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi.h13
1 files changed, 8 insertions, 5 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h
index 96b350366670..08ac3200b4a4 100644
--- a/include/scsi/scsi.h
+++ b/include/scsi/scsi.h
@@ -106,12 +106,15 @@ enum scsi_disposition {
};
/*
- * Midlevel queue return values.
+ * Status values returned by the .queuecommand() callback if a command has not
+ * been queued.
*/
-#define SCSI_MLQUEUE_HOST_BUSY 0x1055
-#define SCSI_MLQUEUE_DEVICE_BUSY 0x1056
-#define SCSI_MLQUEUE_EH_RETRY 0x1057
-#define SCSI_MLQUEUE_TARGET_BUSY 0x1058
+enum scsi_qc_status {
+ SCSI_MLQUEUE_HOST_BUSY = 0x1055,
+ SCSI_MLQUEUE_DEVICE_BUSY = 0x1056,
+ SCSI_MLQUEUE_EH_RETRY = 0x1057,
+ SCSI_MLQUEUE_TARGET_BUSY = 0x1058,
+};
/*
* Use these to separate status msg and our bytes