diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2008-03-25 01:26:52 +0100 |
---|---|---|
committer | James Bottomley <James.Bottomley@HansenPartnership.com> | 2008-04-07 19:19:02 +0200 |
commit | 11002fbcb472cf1176d97eac214df98f7c17f69c (patch) | |
tree | 0384a2615e3954b43a2b8422d776908a9faf5e1b /drivers/scsi/stex.c | |
parent | [SCSI] libata: use scsi_build_sense_buffer (diff) | |
download | linux-11002fbcb472cf1176d97eac214df98f7c17f69c.tar.xz linux-11002fbcb472cf1176d97eac214df98f7c17f69c.zip |
[SCSI] stex: use scsi_build_sense_buffer
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Acked-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/stex.c')
-rw-r--r-- | drivers/scsi/stex.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index 8c7b1830d9e8..f308a0308829 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -33,6 +33,7 @@ #include <scsi/scsi_host.h> #include <scsi/scsi_tcq.h> #include <scsi/scsi_dbg.h> +#include <scsi/scsi_eh.h> #define DRV_NAME "stex" #define ST_DRIVER_VERSION "3.6.0000.1" @@ -362,22 +363,14 @@ static struct status_msg *stex_get_status(struct st_hba *hba) return status; } -static void stex_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq) -{ - cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION; - - cmd->sense_buffer[0] = 0x70; /* fixed format, current */ - cmd->sense_buffer[2] = sk; - cmd->sense_buffer[7] = 18 - 8; /* additional sense length */ - cmd->sense_buffer[12] = asc; - cmd->sense_buffer[13] = ascq; -} - 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 cbd" */ - stex_set_sense(cmd, ILLEGAL_REQUEST, 0x24, 0x0); + scsi_build_sense_buffer(0, cmd->sense_buffer, ILLEGAL_REQUEST, 0x24, + 0x0); done(cmd); } |