mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
scsi: libiscsi: Use combined sense codes
Refactor libiscsi to use scsi_set_sense() and replace all hard-coded additional sense codes and additional sense code qualifiers with the enum values defined in include/scsi/scsi_sense.h. This helps with code clarity as the sense codes being processed are easier to test and self-documented. No functional change intended. 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-30-dlemoal@kernel.org Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
parent
d6dba463d8
commit
077aa184eb
|
|
@ -892,7 +892,8 @@ static void iscsi_scsi_cmd_rsp(struct iscsi_conn *conn, struct iscsi_hdr *hdr,
|
|||
|
||||
ascq = session->tt->check_protection(task, §or);
|
||||
if (ascq) {
|
||||
scsi_build_sense(sc, 1, ILLEGAL_REQUEST, 0x10, ascq);
|
||||
scsi_set_sense(sc, 1, ILLEGAL_REQUEST,
|
||||
scsi_sense_code(ASC_ID_CRC_OR_ECC_ERROR, ascq));
|
||||
scsi_set_sense_information(sc->sense_buffer,
|
||||
SCSI_SENSE_BUFFERSIZE,
|
||||
sector);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user