diff options
author | James Bottomley <jejb@titanic.(none)> | 2005-08-28 12:31:14 -0400 |
---|---|---|
committer | James Bottomley <jejb@titanic.(none)> | 2005-08-28 12:31:14 -0400 |
commit | 33aa687db90dd8541bd5e9a762eebf880eaee767 (patch) | |
tree | dac741e1f3f43a1de2433a21b874a093783717f3 /drivers/scsi/scsi_error.c | |
parent | 1cf72699c1530c3e4ac3d58344f6a6a40a2f46d3 (diff) |
[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 'drivers/scsi/scsi_error.c')
-rw-r--r-- | drivers/scsi/scsi_error.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c index e9c451ba71fc..2686d5672e5e 100644 --- a/drivers/scsi/scsi_error.c +++ b/drivers/scsi/scsi_error.c | |||
@@ -1847,12 +1847,16 @@ EXPORT_SYMBOL(scsi_reset_provider); | |||
1847 | int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, | 1847 | int scsi_normalize_sense(const u8 *sense_buffer, int sb_len, |
1848 | struct scsi_sense_hdr *sshdr) | 1848 | struct scsi_sense_hdr *sshdr) |
1849 | { | 1849 | { |
1850 | if (!sense_buffer || !sb_len || (sense_buffer[0] & 0x70) != 0x70) | 1850 | if (!sense_buffer || !sb_len) |
1851 | return 0; | 1851 | return 0; |
1852 | 1852 | ||
1853 | memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); | 1853 | memset(sshdr, 0, sizeof(struct scsi_sense_hdr)); |
1854 | 1854 | ||
1855 | sshdr->response_code = (sense_buffer[0] & 0x7f); | 1855 | sshdr->response_code = (sense_buffer[0] & 0x7f); |
1856 | |||
1857 | if (!scsi_sense_valid(sshdr)) | ||
1858 | return 0; | ||
1859 | |||
1856 | if (sshdr->response_code >= 0x72) { | 1860 | if (sshdr->response_code >= 0x72) { |
1857 | /* | 1861 | /* |
1858 | * descriptor format | 1862 | * descriptor format |