Thread (82 messages) flat view 82 messages, 3 authors, 6d ago

Re: [PATCH v6 05/40] scsi: prepare for using 16-bits defined sense codes

From: sashiko-bot@kernel.org
Date: 2026-09-08 09:18:37
Also in: linux-s390, linux-scsi

In preparation for handling sense codes and their qualifiers as a single
16-bits sense code field, with the values  defined as macros in
include/scsi/scsi_sense.h, modify the definition of the structures
scsi_failure and scsi_sense_hdr to introduce a 16-bits sense_code field
as a union with the existing 8-bits asc and ascq fields.

This temporary modification allows accessing either the asc and ascq
fields individually, or their combination as the 16-bits sense_code field.

The helper functions scsi_sense_asc(), scsi_sense_ascq() are defined to
allow accessing the 8-bits ASC and ASCQ values from the sense_code filed
of struct scsi_sense_hdr. The helper functions scsi_failure_asc() and
scsi_failure_ascq() provide the same for the sense code field of struct
scsi_failure.

The helper functions scsi_set_sense_buffer() and scsi_set_sense() are also
added to wrap calls to scsi_build_sense_buffer() and scsi_build_sense()
using a 16-bits sense code aregument instead of the 8-bits ASC and ASCQ
arguments.

Signed-off-by: Damien Le Moal <dlemoal@kernel.org>
Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260908090308.1085097-1-dlemoal@kernel.org?part=5
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help