diff options
Diffstat (limited to 'include/scsi')
-rw-r--r-- | include/scsi/scsi.h | 7 | ||||
-rw-r--r-- | include/scsi/scsi_cmnd.h | 7 | ||||
-rw-r--r-- | include/scsi/scsi_host.h | 13 |
3 files changed, 17 insertions, 10 deletions
diff --git a/include/scsi/scsi.h b/include/scsi/scsi.h index 9f8f80ab0c8b..702fcfeb37f1 100644 --- a/include/scsi/scsi.h +++ b/include/scsi/scsi.h | |||
@@ -11,13 +11,6 @@ | |||
11 | #include <linux/types.h> | 11 | #include <linux/types.h> |
12 | 12 | ||
13 | /* | 13 | /* |
14 | * The maximum sg list length SCSI can cope with | ||
15 | * (currently must be a power of 2 between 32 and 256) | ||
16 | */ | ||
17 | #define SCSI_MAX_PHYS_SEGMENTS MAX_PHYS_SEGMENTS | ||
18 | |||
19 | |||
20 | /* | ||
21 | * SCSI command lengths | 14 | * SCSI command lengths |
22 | */ | 15 | */ |
23 | 16 | ||
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 */ |
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h index 7d210cd6c38d..0fd4746ee39d 100644 --- a/include/scsi/scsi_host.h +++ b/include/scsi/scsi_host.h | |||
@@ -39,6 +39,9 @@ struct blk_queue_tags; | |||
39 | #define DISABLE_CLUSTERING 0 | 39 | #define DISABLE_CLUSTERING 0 |
40 | #define ENABLE_CLUSTERING 1 | 40 | #define ENABLE_CLUSTERING 1 |
41 | 41 | ||
42 | #define DISABLE_SG_CHAINING 0 | ||
43 | #define ENABLE_SG_CHAINING 1 | ||
44 | |||
42 | enum scsi_eh_timer_return { | 45 | enum scsi_eh_timer_return { |
43 | EH_NOT_HANDLED, | 46 | EH_NOT_HANDLED, |
44 | EH_HANDLED, | 47 | EH_HANDLED, |
@@ -443,6 +446,15 @@ struct scsi_host_template { | |||
443 | unsigned ordered_tag:1; | 446 | unsigned ordered_tag:1; |
444 | 447 | ||
445 | /* | 448 | /* |
449 | * true if the low-level driver can support sg chaining. this | ||
450 | * will be removed eventually when all the drivers are | ||
451 | * converted to support sg chaining. | ||
452 | * | ||
453 | * Status: OBSOLETE | ||
454 | */ | ||
455 | unsigned use_sg_chaining:1; | ||
456 | |||
457 | /* | ||
446 | * Countdown for host blocking with no commands outstanding | 458 | * Countdown for host blocking with no commands outstanding |
447 | */ | 459 | */ |
448 | unsigned int max_host_blocked; | 460 | unsigned int max_host_blocked; |
@@ -586,6 +598,7 @@ struct Scsi_Host { | |||
586 | unsigned unchecked_isa_dma:1; | 598 | unsigned unchecked_isa_dma:1; |
587 | unsigned use_clustering:1; | 599 | unsigned use_clustering:1; |
588 | unsigned use_blk_tcq:1; | 600 | unsigned use_blk_tcq:1; |
601 | unsigned use_sg_chaining:1; | ||
589 | 602 | ||
590 | /* | 603 | /* |
591 | * Host has requested that no further requests come through for the | 604 | * Host has requested that no further requests come through for the |