diff options
author | Hannes Reinecke <hare@suse.de> | 2021-04-27 11:30:13 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2021-06-01 05:48:21 +0300 |
commit | f2b1e9c6f867ec8f929e96ba4e4010e267587448 (patch) | |
tree | 5bf630724f083e7dd2a8e82959d9bb342f0b3644 /drivers/scsi/stex.c | |
parent | ced202f7bd78eb6a79c441a8b217e0f3d38bccfc (diff) | |
download | linux-f2b1e9c6f867ec8f929e96ba4e4010e267587448.tar.xz |
scsi: core: Introduce scsi_build_sense()
Introduce scsi_build_sense() as a wrapper around scsi_build_sense_buffer()
to format the buffer and set the correct SCSI status.
Link: https://lore.kernel.org/r/20210427083046.31620-8-hare@suse.de
Reviewed-by: Bart Van Assche <bvanassche@acm.org>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/stex.c')
-rw-r--r-- | drivers/scsi/stex.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 12471208c7a8..3af2a2d3bfa2 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -398,11 +398,8 @@ static struct status_msg *stex_get_status(struct st_hba *hba) static void stex_invalid_field(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) { - cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION; - /* "Invalid field in cdb" */ - scsi_build_sense_buffer(0, cmd->sense_buffer, ILLEGAL_REQUEST, 0x24, - 0x0); + scsi_build_sense(cmd, 0, ILLEGAL_REQUEST, 0x24, 0x0); done(cmd); } |