aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_cmnd.h
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 08:51:05 +1100
committerLinus Torvalds <torvalds@linux-foundation.org>2008-01-29 08:51:05 +1100
commit68fbda7de07e56eb90dd6e58a162527411b388b1 (patch)
tree118f82bb86fdf9dd3480ccabf96a7e5d3ab8bdb9 /include/scsi/scsi_cmnd.h
parentMerge branch 'cfq-ioc-share' of git://git.kernel.dk/linux-2.6-block (diff)
parentSG: work with the SCSI fixed maximum allocations. (diff)
downloadlinux-dev-68fbda7de07e56eb90dd6e58a162527411b388b1.tar.xz
linux-dev-68fbda7de07e56eb90dd6e58a162527411b388b1.zip
Merge branch 'sg' of git://git.kernel.dk/linux-2.6-block
* 'sg' of git://git.kernel.dk/linux-2.6-block: SG: work with the SCSI fixed maximum allocations. SG: Convert SCSI to use scatterlist helpers for sg chaining SG: Move functions to lib/scatterlist.c and add sg chaining allocator helpers
Diffstat (limited to 'include/scsi/scsi_cmnd.h')
-rw-r--r--include/scsi/scsi_cmnd.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/scsi/scsi_cmnd.h b/include/scsi/scsi_cmnd.h
index abd7479ff452..a457fca66f61 100644
--- a/include/scsi/scsi_cmnd.h
+++ b/include/scsi/scsi_cmnd.h
@@ -8,7 +8,6 @@
#include <linux/scatterlist.h>
struct request;
-struct scatterlist;
struct Scsi_Host;
struct scsi_device;
@@ -68,8 +67,8 @@ struct scsi_cmnd {
void *request_buffer; /* Actual requested buffer */
/* These elements define the operation we ultimately want to perform */
+ struct sg_table sg_table;
unsigned short use_sg; /* Number of pieces of scatter-gather */
- unsigned short __use_sg;
unsigned underflow; /* Return error if less than
this amount is transferred */
@@ -128,14 +127,14 @@ extern void *scsi_kmap_atomic_sg(struct scatterlist *sg, int sg_count,
size_t *offset, size_t *len);
extern void scsi_kunmap_atomic_sg(void *virt);
-extern struct scatterlist *scsi_alloc_sgtable(struct scsi_cmnd *, gfp_t);
+extern int scsi_alloc_sgtable(struct scsi_cmnd *, gfp_t);
extern void scsi_free_sgtable(struct scsi_cmnd *);
extern int scsi_dma_map(struct scsi_cmnd *cmd);
extern void scsi_dma_unmap(struct scsi_cmnd *cmd);
#define scsi_sg_count(cmd) ((cmd)->use_sg)
-#define scsi_sglist(cmd) ((struct scatterlist *)(cmd)->request_buffer)
+#define scsi_sglist(cmd) ((cmd)->sg_table.sgl)
#define scsi_bufflen(cmd) ((cmd)->request_bufflen)
static inline void scsi_set_resid(struct scsi_cmnd *cmd, int resid)