Thread (90 messages) flat view 90 messages, 4 authors, 15d ago
COLD15d

Revision v2 of 5 in this series.

Revisions (5)
  1. v2 current
  2. v3 [diff vs current]
  3. v4 [diff vs current]
  4. v5 [diff vs current]
  5. v6 [diff vs current]

[PATCH v2 38/40] s390: scsi: use 16-bits defined sense codes

From: Damien Le Moal <dlemoal@kernel.org>
Date: 2026-09-03 03:43:27
Also in: linux-ide, linux-s390, linux-scsi
Subsystem: s390 architecture, s390 zfcp driver, the rest · Maintainers: Heiko Carstens, Vasily Gorbik, Alexander Gordeev, Nihar Panda, Linus Torvalds

Use the 16-bits sense codes 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>
---
 drivers/s390/scsi/zfcp_scsi.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/s390/scsi/zfcp_scsi.c b/drivers/s390/scsi/zfcp_scsi.c
index 3590113c2b74..0994fa328a4f 100644
--- a/drivers/s390/scsi/zfcp_scsi.c
+++ b/drivers/s390/scsi/zfcp_scsi.c
@@ -856,7 +856,8 @@ void zfcp_scsi_set_prot(struct zfcp_adapter *adapter)
  */
 void zfcp_scsi_dif_sense_error(struct scsi_cmnd *scmd, int ascq)
 {
-	scsi_build_sense(scmd, 1, ILLEGAL_REQUEST, 0x10, ascq);
+	scsi_set_sense(scmd, 1, ILLEGAL_REQUEST,
+		       scsi_sense_code(ASC_ID_CRC_OR_ECC_ERROR, ascq));
 	set_host_byte(scmd, DID_SOFT_ERROR);
 }
 
-- 
2.55.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help