From e38cc66c2ba886b41848d3c27193c80456d74945 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 18 Aug 2010 12:59:28 +0000 Subject: [PATCH] Change SCSI_MAX_SG_SEGMENTS to more correct SG_MAX_SINGLE_ALLOC git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1956 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst_local/scst_local.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 4686f6a5f..e85fa424a 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -47,7 +47,7 @@ #include #if (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 25)) -#define SCSI_MAX_SG_SEGMENTS 128 +#define SG_MAX_SINGLE_ALLOC (PAGE_SIZE / sizeof(struct scatterlist)) #endif #if defined(CONFIG_HIGHMEM4G) || defined(CONFIG_HIGHMEM64G) @@ -954,7 +954,7 @@ static struct scsi_host_template scst_lcl_ini_driver_template = { .can_queue = 256, .this_id = SCST_LOCAL_MAX_TARGETS, /* SCST doesn't support sg chaining */ - .sg_tablesize = SCSI_MAX_SG_SEGMENTS, + .sg_tablesize = SG_MAX_SINGLE_ALLOC, .cmd_per_lun = 32, .max_sectors = 0xffff, /*