Index: linux-2.4.21/drivers/addon/qla2200/qla2x00.h =================================================================== --- linux-2.4.21.orig/drivers/addon/qla2200/qla2x00.h 2005-06-01 22:51:57.000000000 -0400 +++ linux-2.4.21/drivers/addon/qla2200/qla2x00.h 2005-06-01 23:06:10.592857440 -0400 @@ -3275,7 +3275,7 @@ /* Kernel version specific template additions */ /* Number of segments 1 - 65535 */ -#define SG_SEGMENTS 32 /* Cmd entry + 6 continuations */ +#define SG_SEGMENTS 512 /* Cmd entry + 6 continuations */ /* * Scsi_Host_template (see hosts.h) @@ -3289,7 +3289,7 @@ * */ #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,8) -#define TEMPLATE_MAX_SECTORS max_sectors: 512, +#define TEMPLATE_MAX_SECTORS max_sectors: 2048, #else #define TEMPLATE_MAX_SECTORS #endif Index: linux-2.4.21/include/linux/blkdev.h =================================================================== --- linux-2.4.21.orig/include/linux/blkdev.h 2005-06-01 22:51:55.000000000 -0400 +++ linux-2.4.21/include/linux/blkdev.h 2005-06-01 23:07:26.186365480 -0400 @@ -262,10 +262,10 @@ extern char * blkdev_varyio[MAX_BLKDEV]; -#define MAX_SEGMENTS 128 +#define MAX_SEGMENTS 256 #define MAX_SECTORS 255 /* General-case limit for superbh size: */ -#define MAX_SUPERBH 32768 /* must fit info ->b_size right now */ +#define MAX_SUPERBH (1<<20) /* must fit info ->b_size right now */ /* Limit for superbh when we're certain it cannot be bounce-buffered: */ #define MAX_SUPERBH_NOBOUNCE (1024*1024) /* must fit info ->b_size right now */ Index: linux-2.4.21/mm/highmem.c =================================================================== --- linux-2.4.21.orig/mm/highmem.c 2005-06-01 22:51:50.000000000 -0400 +++ linux-2.4.21/mm/highmem.c 2005-06-01 23:06:10.594857136 -0400 @@ -474,7 +474,7 @@ /* * FIXME: assuming PAGE_SIZE buffer_heads */ -#define SUPERBH_MAX_USERS (POOL_SIZE * PAGE_SIZE / MAX_SUPERBH) +#define SUPERBH_MAX_USERS max(POOL_SIZE * PAGE_SIZE / MAX_SUPERBH, 1) static int superbh_users; static DECLARE_WAIT_QUEUE_HEAD(superbh_wait);