diff options
author | Mike Christie <michael.christie@oracle.com> | 2022-11-21 21:26:02 -0600 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-12-01 03:22:23 +0000 |
commit | 04b3c8c0025a1d91a0e133e9b2734a002960f472 (patch) | |
tree | 751ee1508cf0aec27ccfe5830ca939d89601a7dc /include | |
parent | c9293c1199ecd3cfa07931ec3630f37dba1ca1b8 (diff) | |
download | linux-stable-04b3c8c0025a1d91a0e133e9b2734a002960f472.tar.gz linux-stable-04b3c8c0025a1d91a0e133e9b2734a002960f472.tar.bz2 linux-stable-04b3c8c0025a1d91a0e133e9b2734a002960f472.zip |
scsi: sd: Convert SCSI errors to PR errors
This converts the SCSI errors we commonly see during PR handling to PR_STS
errors or -Exyz errors. pr_ops callers can then handle SCSI and NVMe errors
without knowing the device types.
Signed-off-by: Mike Christie <michael.christie@oracle.com>
Link: https://lore.kernel.org/r/20221122032603.32766-4-michael.christie@oracle.com
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/scsi.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 3e46859774c8..ec093594ba53 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h @@ -121,6 +121,7 @@ enum scsi_disposition { * msg_byte (unused) * host_byte = set by low-level driver to indicate status. */ +#define status_byte(result) (result & 0xff) #define host_byte(result) (((result) >> 16) & 0xff) #define sense_class(sense) (((sense) >> 4) & 0x7) |