Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

scsi: core: Kill message byte

Remove last vestiges of SCSI status message bytes.

Link: https://lore.kernel.org/r/20210427083046.31620-39-hare@suse.de
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>

authored by

Hannes Reinecke and committed by
Martin K. Petersen
a7479a84 54cf31d0

+5 -39
+3 -3
Documentation/scsi/scsi_mid_low_api.rst
··· 1172 1172 of 0 implies a successfully completed command (and all 1173 1173 data (if any) has been transferred to or from the SCSI 1174 1174 target device). 'result' is a 32 bit unsigned integer that 1175 - can be viewed as 4 related bytes. The SCSI status value is 1176 - in the LSB. See include/scsi/scsi.h status_byte(), 1177 - msg_byte() and host_byte() macros and related constants. 1175 + can be viewed as 2 related bytes. The SCSI status value is 1176 + in the LSB. See include/scsi/scsi.h status_byte() and 1177 + host_byte() macros and related constants. 1178 1178 sense_buffer 1179 1179 - an array (maximum size: SCSI_SENSE_BUFFERSIZE bytes) that 1180 1180 should be written when the SCSI status (LSB of 'result')
+1 -4
drivers/scsi/scsi_lib.c
··· 591 591 { 592 592 switch (host_byte(result)) { 593 593 case DID_OK: 594 - /* 595 - * Also check the other bytes than the status byte in result 596 - */ 597 - if (scsi_status_is_good(result) && (result & ~0xff) == 0) 594 + if (scsi_status_is_good(result)) 598 595 return BLK_STS_OK; 599 596 return BLK_STS_IOERR; 600 597 case DID_TRANSPORT_FAILFAST:
+1 -32
include/trace/events/scsi.h
··· 124 124 scsi_hostbyte_name(DID_TRANSPORT_DISRUPTED), \ 125 125 scsi_hostbyte_name(DID_TRANSPORT_FAILFAST)) 126 126 127 - #define scsi_msgbyte_name(result) { result, #result } 128 - #define show_msgbyte_name(val) \ 129 - __print_symbolic(val, \ 130 - scsi_msgbyte_name(COMMAND_COMPLETE), \ 131 - scsi_msgbyte_name(EXTENDED_MESSAGE), \ 132 - scsi_msgbyte_name(SAVE_POINTERS), \ 133 - scsi_msgbyte_name(RESTORE_POINTERS), \ 134 - scsi_msgbyte_name(DISCONNECT), \ 135 - scsi_msgbyte_name(INITIATOR_ERROR), \ 136 - scsi_msgbyte_name(ABORT_TASK_SET), \ 137 - scsi_msgbyte_name(MESSAGE_REJECT), \ 138 - scsi_msgbyte_name(NOP), \ 139 - scsi_msgbyte_name(MSG_PARITY_ERROR), \ 140 - scsi_msgbyte_name(LINKED_CMD_COMPLETE), \ 141 - scsi_msgbyte_name(LINKED_FLG_CMD_COMPLETE), \ 142 - scsi_msgbyte_name(TARGET_RESET), \ 143 - scsi_msgbyte_name(ABORT_TASK), \ 144 - scsi_msgbyte_name(CLEAR_TASK_SET), \ 145 - scsi_msgbyte_name(INITIATE_RECOVERY), \ 146 - scsi_msgbyte_name(RELEASE_RECOVERY), \ 147 - scsi_msgbyte_name(CLEAR_ACA), \ 148 - scsi_msgbyte_name(LOGICAL_UNIT_RESET), \ 149 - scsi_msgbyte_name(SIMPLE_QUEUE_TAG), \ 150 - scsi_msgbyte_name(HEAD_OF_QUEUE_TAG), \ 151 - scsi_msgbyte_name(ORDERED_QUEUE_TAG), \ 152 - scsi_msgbyte_name(IGNORE_WIDE_RESIDUE), \ 153 - scsi_msgbyte_name(ACA), \ 154 - scsi_msgbyte_name(QAS_REQUEST), \ 155 - scsi_msgbyte_name(BUS_DEVICE_RESET), \ 156 - scsi_msgbyte_name(ABORT)) 157 - 158 127 #define scsi_statusbyte_name(result) { result, #result } 159 128 #define show_statusbyte_name(val) \ 160 129 __print_symbolic(val, \ ··· 285 316 __print_hex(__get_dynamic_array(cmnd), __entry->cmd_len), 286 317 "DRIVER_OK", 287 318 show_hostbyte_name(((__entry->result) >> 16) & 0xff), 288 - show_msgbyte_name(((__entry->result) >> 8) & 0xff), 319 + "COMMAND_COMPLETE", 289 320 show_statusbyte_name(__entry->result & 0xff)) 290 321 ); 291 322