mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
scsi: ibmvscsi_tgt: Use combined sense codes
Refactor the IBM virtual SCSI target driver to use scsi_set_sense_buffer() 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-31-dlemoal@kernel.org Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
This commit is contained in:
parent
077aa184eb
commit
01526b511d
|
|
@ -3757,9 +3757,8 @@ static int ibmvscsis_queue_data_in(struct se_cmd *se_cmd)
|
|||
dev_err(&vscsi->dev, "srp_transfer_data failed: %d\n", rc);
|
||||
se_cmd->scsi_sense_length = 18;
|
||||
memset(se_cmd->sense_buffer, 0, se_cmd->scsi_sense_length);
|
||||
/* Logical Unit Communication Time-out asc/ascq = 0x0801 */
|
||||
scsi_build_sense_buffer(0, se_cmd->sense_buffer, MEDIUM_ERROR,
|
||||
0x08, 0x01);
|
||||
scsi_set_sense_buffer(0, se_cmd->sense_buffer, MEDIUM_ERROR,
|
||||
LU_COMMUNICATION_TIMEOUT);
|
||||
}
|
||||
|
||||
srp_build_response(vscsi, cmd, &len);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user