Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 89701
b: refs/heads/master
c: 11002fb
h: refs/heads/master
i:
  89699: 1ae6ab6
v: v3
  • Loading branch information
FUJITA Tomonori authored and James Bottomley committed Apr 7, 2008
1 parent 12c0b2d commit 4cbfdcc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 13 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 526917641aa50eb852591cc3953a92374bedc836
refs/heads/master: 11002fbcb472cf1176d97eac214df98f7c17f69c
17 changes: 5 additions & 12 deletions trunk/drivers/scsi/stex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 4cbfdcc

Please sign in to comment.