1 --- a/block/blk-settings.c 2013-02-06 12:40:44.000000000 -0500
2 +++ b/block/blk-settings.c 2013-02-06 12:55:28.000000000 -0500
5 unsigned long blk_max_pfn;
7 +int default_max_sectors = BLK_DEF_MAX_SECTORS;
8 +module_param(default_max_sectors, int, 0);
10 +int default_max_segments = BLK_MAX_SEGMENTS;
11 +module_param(default_max_segments, int, 0);
14 * blk_queue_prep_rq - set a prepare_request function for queue
18 void blk_set_default_limits(struct queue_limits *lim)
20 - lim->max_segments = BLK_MAX_SEGMENTS;
21 + lim->max_segments = default_max_segments;
22 lim->max_integrity_segments = 0;
23 lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
24 lim->max_segment_size = BLK_MAX_SEGMENT_SIZE;
27 limits->max_hw_sectors = max_hw_sectors;
28 limits->max_sectors = min_t(unsigned int, max_hw_sectors,
29 - BLK_DEF_MAX_SECTORS);
30 + default_max_sectors);
32 EXPORT_SYMBOL(blk_limits_max_hw_sectors);
34 --- a/drivers/scsi/Kconfig 2013-02-07 09:25:49.000000000 -0500
35 +++ b/drivers/scsi/Kconfig 2013-02-07 09:30:15.000000000 -0500
36 @@ -245,6 +245,15 @@ config SCSI_SCAN_ASYNC
37 there should be no noticeable performance impact as long as you have
40 +config SCSI_MAX_SG_SEGMENTS
41 + int "Maximum SCSI scatter gather segment size"
46 + Control the maximum limit for scatter gather buffers for the
49 config SCSI_SCAN_ASYNC
50 bool "Asynchronous SCSI scanning"
52 --- a/include/scsi/scsi.h 2013-02-07 09:55:02.000000000 -0500
53 +++ b/include/scsi/scsi.h 2013-02-07 09:55:20.000000000 -0500
54 @@ -20,7 +20,7 @@ struct scsi_cmnd;
55 * to SG_MAX_SINGLE_ALLOC to pack correctly at the highest order. The
58 -#define SCSI_MAX_SG_SEGMENTS 128
59 +#define SCSI_MAX_SG_SEGMENTS CONFIG_SCSI_MAX_SG_SEGMENTS
62 * Like SCSI_MAX_SG_SEGMENTS, but for archs that have sg chaining. This limit
63 --- a/drivers/scsi/isci/init.c 2013-02-07 09:59:49.000000000 -0500
64 +++ b/drivers/scsi/isci/init.c 2013-02-07 10:01:51.000000000 -0500
66 module_param(phy_gen, byte, 0);
67 MODULE_PARM_DESC(phy_gen, "PHY generation (1: 1.5Gbps 2: 3.0Gbps 3: 6.0Gbps)");
69 +u16 sg_table_size = SG_ALL;
70 +module_param(sg_table_size, ushort, 0);
71 +MODULE_PARM_DESC(sg_table_size, "Size in KB of scatter gather table");
73 unsigned char max_concurr_spinup;
74 module_param(max_concurr_spinup, byte, 0);
75 MODULE_PARM_DESC(max_concurr_spinup, "Max concurrent device spinup");
77 .can_queue = ISCI_CAN_QUEUE_VAL,
80 - .sg_tablesize = SG_ALL,
81 .max_sectors = SCSI_DEFAULT_MAX_SECTORS,
82 .use_clustering = ENABLE_CLUSTERING,
83 .eh_abort_handler = sas_eh_abort_handler,
86 INIT_LIST_HEAD(&idev->node);
88 + isci_sht.sg_tablesize = sg_table_size;
90 shost = scsi_host_alloc(&isci_sht, sizeof(void *));
92 Increase MAX_SGE for fusion mpt driver.
94 Index: linux-2.6.32.i386/drivers/message/fusion/Kconfig
95 ===================================================================
96 --- linux-2.6.32.i386.orig/drivers/message/fusion/Kconfig 2009-12-03 09:21:21.000000000 +0530
97 +++ linux-2.6.32.i386/drivers/message/fusion/Kconfig 2010-03-16 16:45:08.000000000 +0530
101 config FUSION_MAX_SGE
102 - int "Maximum number of scatter gather entries (16 - 128)"
105 + int "Maximum number of scatter gather entries (16 - 256)"
109 This option allows you to specify the maximum number of scatter-
110 gather entries per I/O. The driver default is 128, which matches
111 Index: linux-2.6.32.i386/drivers/message/fusion/mptbase.h
112 ===================================================================
113 --- linux-2.6.32.i386.orig/drivers/message/fusion/mptbase.h 2009-12-03 09:21:21.000000000 +0530
114 +++ linux-2.6.32.i386/drivers/message/fusion/mptbase.h 2010-03-16 16:46:54.000000000 +0530
115 @@ -165,10 +165,10 @@
116 * Set the MAX_SGE value based on user input.
118 #ifdef CONFIG_FUSION_MAX_SGE
119 -#if CONFIG_FUSION_MAX_SGE < 16
120 +#if CONFIG_FUSION_MAX_SGE < 16
121 #define MPT_SCSI_SG_DEPTH 16
122 -#elif CONFIG_FUSION_MAX_SGE > 128
123 -#define MPT_SCSI_SG_DEPTH 128
124 +#elif CONFIG_FUSION_MAX_SGE > 256
125 +#define MPT_SCSI_SG_DEPTH 256
127 #define MPT_SCSI_SG_DEPTH CONFIG_FUSION_MAX_SGE