aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/st.h
diff options
context:
space:
mode:
authorMike Christie <michaelc@cs.wisc.edu>2005-11-08 05:06:44 -0500
committerJames Bottomley <jejb@mulgrave.(none)>2005-12-14 22:16:31 -0500
commit8b05b773b6030de5b1bab1cbb0bf1ff8c34cdbe0 (patch)
tree0d364c50de0ef767846b366307ba69c3c95779b0 /drivers/scsi/st.h
parentd6b10348f9397943eb968419a2b7f08895e38472 (diff)
[SCSI] convert st to use scsi_execute_async
convert st to always send scatterlists and kill scsi_request usage. This is the same as last time as it was posted, but with Kai's patches merged and we now pass the bytes value to scsi_execute_async. TODO: - move DIO code to common place or make block layers usable for ULDs. - move buffer allocation code to common place for all ULDs to use. And make buffer allocation code handle all queue limits so we can find out about problems before calling scsi_execute_async. - move indirect (copy_to/from_user) paths commone place or make block layers usable for ULDs. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/st.h')
-rw-r--r--drivers/scsi/st.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/scsi/st.h b/drivers/scsi/st.h
index 790acac160bc..411209048d74 100644
--- a/drivers/scsi/st.h
+++ b/drivers/scsi/st.h
@@ -4,6 +4,7 @@
4 4
5#include <linux/completion.h> 5#include <linux/completion.h>
6#include <linux/kref.h> 6#include <linux/kref.h>
7#include <scsi/scsi_cmnd.h>
7 8
8/* Descriptor for analyzed sense data */ 9/* Descriptor for analyzed sense data */
9struct st_cmdstatus { 10struct st_cmdstatus {
@@ -17,6 +18,17 @@ struct st_cmdstatus {
17 u8 deferred; 18 u8 deferred;
18}; 19};
19 20
21struct scsi_tape;
22
23/* scsi tape command */
24struct st_request {
25 unsigned char cmd[MAX_COMMAND_SIZE];
26 unsigned char sense[SCSI_SENSE_BUFFERSIZE];
27 int result;
28 struct scsi_tape *stp;
29 struct completion *waiting;
30};
31
20/* The tape buffer descriptor. */ 32/* The tape buffer descriptor. */
21struct st_buffer { 33struct st_buffer {
22 unsigned char in_use; 34 unsigned char in_use;
@@ -28,7 +40,7 @@ struct st_buffer {
28 int read_pointer; 40 int read_pointer;
29 int writing; 41 int writing;
30 int syscall_result; 42 int syscall_result;
31 struct scsi_request *last_SRpnt; 43 struct st_request *last_SRpnt;
32 struct st_cmdstatus cmdstat; 44 struct st_cmdstatus cmdstat;
33 unsigned char *b_data; 45 unsigned char *b_data;
34 unsigned short use_sg; /* zero or max number of s/g segments for this adapter */ 46 unsigned short use_sg; /* zero or max number of s/g segments for this adapter */