diff options
Diffstat (limited to 'include/scsi/scsi_cmnd.h')
-rw-r--r-- | include/scsi/scsi_cmnd.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h index 65ab5145a09b..3f47e522a1ec 100644 --- a/include/scsi/scsi_cmnd.h +++ b/include/scsi/scsi_cmnd.h | |||
@@ -5,6 +5,7 @@ | |||
5 | #include <linux/list.h> | 5 | #include <linux/list.h> |
6 | #include <linux/types.h> | 6 | #include <linux/types.h> |
7 | #include <linux/timer.h> | 7 | #include <linux/timer.h> |
8 | #include <linux/scatterlist.h> | ||
8 | 9 | ||
9 | struct request; | 10 | struct request; |
10 | struct scatterlist; | 11 | struct scatterlist; |
@@ -68,7 +69,7 @@ struct scsi_cmnd { | |||
68 | 69 | ||
69 | /* These elements define the operation we ultimately want to perform */ | 70 | /* These elements define the operation we ultimately want to perform */ |
70 | unsigned short use_sg; /* Number of pieces of scatter-gather */ | 71 | unsigned short use_sg; /* Number of pieces of scatter-gather */ |
71 | unsigned short sglist_len; /* size of malloc'd scatter-gather list */ | 72 | unsigned short __use_sg; |
72 | 73 | ||
73 | unsigned underflow; /* Return error if less than | 74 | unsigned underflow; /* Return error if less than |
74 | this amount is transferred */ | 75 | this amount is transferred */ |
@@ -128,7 +129,7 @@ extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count, | |||
128 | extern void scsi_kunmap_atomic_sg(void *virt); | 129 | extern void scsi_kunmap_atomic_sg(void *virt); |
129 | 130 | ||
130 | extern struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *, gfp_t); | 131 | extern struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *, gfp_t); |
131 | extern void scsi_free_sgtable(struct scatterlist *, int); | 132 | extern void scsi_free_sgtable(struct scsi_cmnd *); |
132 | 133 | ||
133 | extern int scsi_dma_map(struct scsi_cmnd *cmd); | 134 | extern int scsi_dma_map(struct scsi_cmnd *cmd); |
134 | extern void scsi_dma_unmap(struct scsi_cmnd *cmd); | 135 | extern void scsi_dma_unmap(struct scsi_cmnd *cmd); |
@@ -148,6 +149,6 @@ static inline int scsi_get_resid(struct scsi_cmnd *cmd) | |||
148 | } | 149 | } |
149 | 150 | ||
150 | #define scsi_for_each_sg(cmd, sg, nseg, __i) \ | 151 | #define scsi_for_each_sg(cmd, sg, nseg, __i) \ |
151 | for (__i = 0, sg = scsi_sglist(cmd); __i < (nseg); __i++, (sg)++) | 152 | for_each_sg(scsi_sglist(cmd), sg, nseg, __i) |
152 | 153 | ||
153 | #endif /* _SCSI_SCSI_CMND_H */ | 154 | #endif /* _SCSI_SCSI_CMND_H */ |