From 33aa687db90dd8541bd5e9a762eebf880eaee767 Mon Sep 17 00:00:00 2001
From: James Bottomley <jejb@titanic.(none)>
Date: Sun, 28 Aug 2005 11:31:14 -0500
Subject: [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>
---
 include/scsi/scsi_eh.h | 8 ++++++++
 1 file changed, 8 insertions(+)

(limited to 'include/scsi/scsi_eh.h')

diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h
index 80557f879e3..b24d224281b 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 *));
-- 
cgit v1.2.3-18-g5258


From fe1b2d544d71300f8e2d151c3c77a130d13a58be Mon Sep 17 00:00:00 2001
From: Christoph Hellwig <hch@lst.de>
Date: Tue, 6 Sep 2005 14:15:37 +0200
Subject: [SCSI] unexport scsi_add_timer/scsi_delete_timer

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
---
 include/scsi/scsi_eh.h | 3 ---
 1 file changed, 3 deletions(-)

(limited to 'include/scsi/scsi_eh.h')

diff --git a/include/scsi/scsi_eh.h b/include/scsi/scsi_eh.h
index 80557f879e3..4b71095be68 100644
--- a/include/scsi/scsi_eh.h
+++ b/include/scsi/scsi_eh.h
@@ -27,9 +27,6 @@ struct scsi_sense_hdr {		/* See SPC-3 section 4.5 */
 };
 
 
-extern void scsi_add_timer(struct scsi_cmnd *, int,
-		void (*)(struct scsi_cmnd *));
-extern int scsi_delete_timer(struct scsi_cmnd *);
 extern void scsi_report_bus_reset(struct Scsi_Host *, int);
 extern void scsi_report_device_reset(struct Scsi_Host *, int, int);
 extern int scsi_block_when_processing_errors(struct scsi_device *);
-- 
cgit v1.2.3-18-g5258