diff options
author | Mike Christie <michael.christie@oracle.com> | 2022-11-22 06:26:02 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-12-01 06:22:23 +0300 |
commit | 04b3c8c0025a1d91a0e133e9b2734a002960f472 (patch) | |
tree | 751ee1508cf0aec27ccfe5830ca939d89601a7dc /include/scsi/scsi.h | |
parent | c9293c1199ecd3cfa07931ec3630f37dba1ca1b8 (diff) | |
download | linux-04b3c8c0025a1d91a0e133e9b2734a002960f472.tar.xz |
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/scsi/scsi.h')
-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) |