aboutsummaryrefslogtreecommitdiff
path: root/include/scsi
diff options
context:
space:
mode:
authorMike Christie <[email protected]>2022-11-21 21:26:02 -0600
committerMartin K. Petersen <[email protected]>2022-12-01 03:22:23 +0000
commit04b3c8c0025a1d91a0e133e9b2734a002960f472 (patch)
tree751ee1508cf0aec27ccfe5830ca939d89601a7dc /include/scsi
parentc9293c1199ecd3cfa07931ec3630f37dba1ca1b8 (diff)
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: Christoph Hellwig <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Signed-off-by: Martin K. Petersen <[email protected]>
Diffstat (limited to 'include/scsi')
-rw-r--r--include/scsi/scsi.h1
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)