diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-08-28 18:31:14 +0200 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-08-28 18:31:14 +0200 |
commit | 33aa687db90dd8541bd5e9a762eebf880eaee767 (patch) | |
tree | dac741e1f3f43a1de2433a21b874a093783717f3 /include/scsi/scsi_eh.h | |
parent | [SCSI] convert the remaining mid-layer pieces to scsi_execute_req (diff) | |
download | linux-33aa687db90dd8541bd5e9a762eebf880eaee767.tar.xz linux-33aa687db90dd8541bd5e9a762eebf880eaee767.zip |
[SCSI] convert SPI transport class to scsi_execute
This one's slightly more difficult. The transport class uses
REQ_FAILFAST, so another interface (scsi_execute) had to be invented to
take the extra flag. Also, the sense functions are shifted around to
allow spi_execute to place data directly into a struct scsi_sense_hdr.
With this change, there's probably a lot of unnecessary sense buffer
allocation going on which we can fix later.
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi/scsi_eh.h')
-rw-r--r-- | include/scsi/scsi_eh.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h index 80557f879e3e..b24d224281bd 100644 --- a/include/scsi/scsi_eh.h +++ b/include/scsi/scsi_eh.h @@ -26,6 +26,14 @@ struct scsi_sense_hdr { /* See SPC-3 section 4.5 */ u8 additional_length; /* always 0 for fixed sense format */ }; +static inline int scsi_sense_valid(struct scsi_sense_hdr *sshdr) +{ + if (!sshdr) + return 0; + + return (sshdr->response_code & 0x70) == 0x70; +} + extern void scsi_add_timer(struct scsi_cmnd *, int, void (*)(struct scsi_cmnd *)); |