diff options
| author | Bart Van Assche <[email protected]> | 2021-05-24 02:54:55 +0000 |
|---|---|---|
| committer | Martin K. Petersen <[email protected]> | 2021-06-02 20:10:46 +0000 |
| commit | d377f415dddc18b33c88dcd41cfe4fe6d9db82fb (patch) | |
| tree | ad098735e63da4ac386a69ab56f12ee609156e22 /include/scsi/libsas.h | |
| parent | Merge branch '5.14/scsi-result' into 5.14/scsi-staging (diff) | |
| download | kernel-d377f415dddc18b33c88dcd41cfe4fe6d9db82fb.tar.gz kernel-d377f415dddc18b33c88dcd41cfe4fe6d9db82fb.zip | |
scsi: libsas: Introduce more SAM status code aliases in enum exec_status
This patch prepares for converting SAM status codes into an enum. Without
this patch converting SAM status codes into an enumeration type would
trigger complaints about enum type mismatches for the SAS code.
Link: https://lore.kernel.org/r/[email protected]
Cc: Hannes Reinecke <[email protected]>
Cc: Artur Paszkiewicz <[email protected]>
Cc: Jason Yan <[email protected]>
Reviewed-by: John Garry <[email protected]>
Reviewed-by: Himanshu Madhani <[email protected]>
Acked-by: Jack Wang <[email protected]>
Signed-off-by: Bart Van Assche <[email protected]>
Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'include/scsi/libsas.h')
| -rw-r--r-- | include/scsi/libsas.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h index 9271d7a49b90..6fe125a71b60 100644 --- a/include/scsi/libsas.h +++ b/include/scsi/libsas.h @@ -474,10 +474,16 @@ enum service_response { }; enum exec_status { - /* The SAM_STAT_.. codes fit in the lower 6 bits, alias some of - * them here to silence 'case value not in enumerated type' warnings + /* + * Values 0..0x7f are used to return the SAM_STAT_* codes. To avoid + * 'case value not in enumerated type' compiler warnings every value + * returned through the exec_status enum needs an alias with the SAS_ + * prefix here. */ - __SAM_STAT_CHECK_CONDITION = SAM_STAT_CHECK_CONDITION, + SAS_SAM_STAT_GOOD = SAM_STAT_GOOD, + SAS_SAM_STAT_BUSY = SAM_STAT_BUSY, + SAS_SAM_STAT_TASK_ABORTED = SAM_STAT_TASK_ABORTED, + SAS_SAM_STAT_CHECK_CONDITION = SAM_STAT_CHECK_CONDITION, SAS_DEV_NO_RESPONSE = 0x80, SAS_DATA_UNDERRUN, |
