aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_host.h
diff options
context:
space:
mode:
authorJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-10 10:42:46 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-02-11 14:40:13 -0500
commit4660c8ed5aaed99d82785499f034a8cc9199866d (patch)
tree5583446125e4d649f28cb678ee809a2937964555 /include/scsi/scsi_host.h
parent90b0c41829450d60da388edcd346c5b31371e7be (diff)
[SCSI] update SG_ALL to avoid causing chaining
Since the sg chaining patches went in, our current value of 255 for SG_ALL excites chaining on some drivers which cannot support it (and would thus oops). Redefine SG_ALL to mean no sg table size preference, but use the single allocation (non chained) limit. This also helps for drivers that use it to size an internal table. We'll do an opt in system later where truly chaining supporting drivers can define their sg_tablesize to be anything up to SCSI_MAX_SG_CHAIN_ELEMENTS. Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'include/scsi/scsi_host.h')
-rw-r--r--include/scsi/scsi_host.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index d1299e999723..530ff4c553f8 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -6,6 +6,7 @@
6#include <linux/types.h> 6#include <linux/types.h>
7#include <linux/workqueue.h> 7#include <linux/workqueue.h>
8#include <linux/mutex.h> 8#include <linux/mutex.h>
9#include <scsi/scsi.h>
9 10
10struct request_queue; 11struct request_queue;
11struct block_device; 12struct block_device;
@@ -25,12 +26,15 @@ struct blk_queue_tags;
25 * NONE: Self evident. Host adapter is not capable of scatter-gather. 26 * NONE: Self evident. Host adapter is not capable of scatter-gather.
26 * ALL: Means that the host adapter module can do scatter-gather, 27 * ALL: Means that the host adapter module can do scatter-gather,
27 * and that there is no limit to the size of the table to which 28 * and that there is no limit to the size of the table to which
28 * we scatter/gather data. 29 * we scatter/gather data. The value we set here is the maximum
30 * single element sglist. To use chained sglists, the adapter
31 * has to set a value beyond ALL (and correctly use the chain
32 * handling API.
29 * Anything else: Indicates the maximum number of chains that can be 33 * Anything else: Indicates the maximum number of chains that can be
30 * used in one scatter-gather request. 34 * used in one scatter-gather request.
31 */ 35 */
32#define SG_NONE 0 36#define SG_NONE 0
33#define SG_ALL 0xff 37#define SG_ALL SCSI_MAX_SG_SEGMENTS
34 38
35#define MODE_UNKNOWN 0x00 39#define MODE_UNKNOWN 0x00
36#define MODE_INITIATOR 0x01 40#define MODE_INITIATOR 0x01