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.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index be117f812deb..d6948d0e8cdb 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -8,6 +8,7 @@
8 8
9struct request; 9struct request;
10struct scatterlist; 10struct scatterlist;
11struct Scsi_Host;
11struct scsi_device; 12struct scsi_device;
12 13
13 14
@@ -72,6 +73,9 @@ struct scsi_cmnd {
72 unsigned short use_sg; /* Number of pieces of scatter-gather */ 73 unsigned short use_sg; /* Number of pieces of scatter-gather */
73 unsigned short sglist_len; /* size of malloc'd scatter-gather list */ 74 unsigned short sglist_len; /* size of malloc'd scatter-gather list */
74 75
76 /* offset in cmd we are at (for multi-transfer tgt cmds) */
77 unsigned offset;
78
75 unsigned underflow; /* Return error if less than 79 unsigned underflow; /* Return error if less than
76 this amount is transferred */ 80 this amount is transferred */
77 81
@@ -119,7 +123,10 @@ struct scsi_cmnd {
119}; 123};
120 124
121extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t); 125extern struct scsi_cmnd *scsi_get_command(struct scsi_device *, gfp_t);
126extern struct scsi_cmnd *__scsi_get_command(struct Scsi_Host *, gfp_t);
122extern void scsi_put_command(struct scsi_cmnd *); 127extern void scsi_put_command(struct scsi_cmnd *);
128extern void __scsi_put_command(struct Scsi_Host *, struct scsi_cmnd *,
129 struct device *);
123extern void scsi_io_completion(struct scsi_cmnd *, unsigned int); 130extern void scsi_io_completion(struct scsi_cmnd *, unsigned int);
124extern void scsi_finish_command(struct scsi_cmnd *cmd); 131extern void scsi_finish_command(struct scsi_cmnd *cmd);
125extern void scsi_req_abort_cmd(struct scsi_cmnd *cmd); 132extern void scsi_req_abort_cmd(struct scsi_cmnd *cmd);
@@ -128,4 +135,7 @@ extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count,
128 size_t *offset, size_t *len); 135 size_t *offset, size_t *len);
129extern void scsi_kunmap_atomic_sg(void *virt); 136extern void scsi_kunmap_atomic_sg(void *virt);
130 137
138extern struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *, gfp_t);
139extern void scsi_free_sgtable(struct scatterlist *, int);
140
131#endif /* _SCSI_SCSI_CMND_H */ 141#endif /* _SCSI_SCSI_CMND_H */