diff options
| author | Damien Le Moal <dlemoal@kernel.org> | 2026-09-08 18:02:29 +0900 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-09-16 10:42:45 -0400 |
| commit | 72c54bd0cbb2e0c35f4acd056e91c596469edc5f (patch) | |
| tree | 34b84d6536fca7ec40a03b327f5914df390bfd8b /include/linux/timerqueue.h | |
| parent | cee9395acd8043be0644b25c34bfa86623f2b935 (diff) | |
scsi: core: Define all additional sense codes and their qualifiers
Introduce the file include/scsi/scsi_sense.h to define all existing
additional sense codes and their combinations with additional sense code
qualifiers, according to the most current T10 list available at
https://www.t10.org/lists/asc-num.txt.
Additional sense codes (ASCs) are individually defined as an 8-bit value
with the ASC_ name prefix. The combination of all ASCs with T10 defined
possible code qualifiers are defined as 16-bit values without any name
prefix. The 16-bit value for ASCs with a zero ASCQ are defined together
with the ASC 8-code using the ASC() macro. For names that may potentially
create conflicts with other subsystems (e.g. WARNING or WRITE_ERROR), the
SSC_ prefix is added to the sense code name.
The sense key macro definitions in include/scsi/scsi_proto.h are also moved
into this new file and scsi_sense.h is included in scsi_proto.h. The
helper function scsi_sense_code() is defined to facilitate generating a
16-bit sense code from the 8-bit ASC and ASCQ. The accessors
scsi_sense_code_asc() and scsi_sense_code_ascq() are defined for the
reverse operations, that is, to respectively extract an ASC and an ASCQ
from a 16-bit sense code.
Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Reviewed-by: Johannes Thumshirn <johannes.thumshirn@wdc.com>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Link: https://patch.msgid.link/20260908090308.1085097-2-dlemoal@kernel.org
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
