aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_cmnd.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/scsi/scsi_cmnd.h')
-rw-r--r--include/scsi/scsi_cmnd.h22
1 files changed, 6 insertions, 16 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index 1ace1b9fe53..58e6444eebe 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -9,7 +9,6 @@
9struct request; 9struct request;
10struct scatterlist; 10struct scatterlist;
11struct scsi_device; 11struct scsi_device;
12struct scsi_request;
13 12
14 13
15/* embedded in scsi_cmnd */ 14/* embedded in scsi_cmnd */
@@ -29,13 +28,8 @@ struct scsi_pointer {
29}; 28};
30 29
31struct scsi_cmnd { 30struct scsi_cmnd {
32 int sc_magic;
33
34 struct scsi_device *device; 31 struct scsi_device *device;
35 struct scsi_request *sc_request;
36
37 struct list_head list; /* scsi_cmnd participates in queue lists */ 32 struct list_head list; /* scsi_cmnd participates in queue lists */
38
39 struct list_head eh_entry; /* entry for the host eh_cmd_q */ 33 struct list_head eh_entry; /* entry for the host eh_cmd_q */
40 int eh_eflags; /* Used by error handlr */ 34 int eh_eflags; /* Used by error handlr */
41 void (*done) (struct scsi_cmnd *); /* Mid-level done function */ 35 void (*done) (struct scsi_cmnd *); /* Mid-level done function */
@@ -64,9 +58,7 @@ struct scsi_cmnd {
64 int timeout_per_command; 58 int timeout_per_command;
65 59
66 unsigned char cmd_len; 60 unsigned char cmd_len;
67 unsigned char old_cmd_len;
68 enum dma_data_direction sc_data_direction; 61 enum dma_data_direction sc_data_direction;
69 enum dma_data_direction sc_old_data_direction;
70 62
71 /* These elements define the operation we are about to perform */ 63 /* These elements define the operation we are about to perform */
72#define MAX_COMMAND_SIZE 16 64#define MAX_COMMAND_SIZE 16
@@ -77,18 +69,11 @@ struct scsi_cmnd {
77 void *request_buffer; /* Actual requested buffer */ 69 void *request_buffer; /* Actual requested buffer */
78 70
79 /* These elements define the operation we ultimately want to perform */ 71 /* These elements define the operation we ultimately want to perform */
80 unsigned char data_cmnd[MAX_COMMAND_SIZE];
81 unsigned short old_use_sg; /* We save use_sg here when requesting
82 * sense info */
83 unsigned short use_sg; /* Number of pieces of scatter-gather */ 72 unsigned short use_sg; /* Number of pieces of scatter-gather */
84 unsigned short sglist_len; /* size of malloc'd scatter-gather list */ 73 unsigned short sglist_len; /* size of malloc'd scatter-gather list */
85 unsigned bufflen; /* Size of data buffer */
86 void *buffer; /* Data buffer */
87 74
88 unsigned underflow; /* Return error if less than 75 unsigned underflow; /* Return error if less than
89 this amount is transferred */ 76 this amount is transferred */
90 unsigned old_underflow; /* save underflow here when reusing the
91 * command for error handling */
92 77
93 unsigned transfersize; /* How much we are guaranteed to 78 unsigned transfersize; /* How much we are guaranteed to
94 transfer with each SCSI transfer 79 transfer with each SCSI transfer
@@ -149,7 +134,12 @@ struct scsi_cmnd {
149 134
150extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); 135extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t);
151extern void scsi_put_command(struct scsi_cmnd *); 136extern void scsi_put_command(struct scsi_cmnd *);
152extern void scsi_io_completion(struct scsi_cmnd *, unsigned int, unsigned int); 137extern void scsi_io_completion(struct scsi_cmnd *, unsigned int);
153extern void scsi_finish_command(struct scsi_cmnd *cmd); 138extern void scsi_finish_command(struct scsi_cmnd *cmd);
139extern void scsi_req_abort_cmd(struct scsi_cmnd *cmd);
140
141extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count,
142 size_t *offset, size_t *len);
143extern void scsi_kunmap_atomic_sg(void *virt);
154 144
155#endif /* _SCSI_SCSI_CMND_H */ 145#endif /* _SCSI_SCSI_CMND_H */