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-08 10:13:00.000000000 -0500
64 +++ b/drivers/scsi/isci/init.c 2013-02-08 10:15:04.000000000 -0500
65 @@ -118,6 +118,10 @@ unsigned char phy_gen = 3;
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 = 1;
74 module_param(max_concurr_spinup, byte, 0);
75 MODULE_PARM_DESC(max_concurr_spinup, "Max concurrent device spinup");
76 @@ -155,7 +159,6 @@ static struct scsi_host_template isci_sh
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_device_reset_handler = sas_eh_device_reset_handler,
84 @@ -407,6 +410,7 @@ static struct isci_host *isci_host_alloc
85 isci_host->pdev = pdev;
88 + isci_sht.sg_tablesize = sg_table_size;
89 shost = scsi_host_alloc(&isci_sht, sizeof(void *));
92 --- a/drivers/message/fusion/Kconfig 2013-02-08 10:21:25.000000000 -0500
93 +++ b/drivers/message/fusion/Kconfig 2013-02-08 10:22:37.000000000 -0500
98 - int "Maximum number of scatter gather entries for SAS and SPI (16 - 128)"
101 + int "Maximum number of scatter gather entries for SAS and SPI (16 - 256)"
105 This option allows you to specify the maximum number of scatter-
106 gather entries per I/O. The driver default is 128, which matches
107 --- a/drivers/message/fusion/mptbase.h 2013-02-08 10:32:45.000000000 -0500
108 +++ b/drivers/message/fusion/mptbase.h 2013-02-08 10:32:55.000000000 -0500
110 #ifdef CONFIG_FUSION_MAX_SGE
111 #if CONFIG_FUSION_MAX_SGE < 16
112 #define MPT_SCSI_SG_DEPTH 16
113 -#elif CONFIG_FUSION_MAX_SGE > 128
114 -#define MPT_SCSI_SG_DEPTH 128
115 +#elif CONFIG_FUSION_MAX_SGE > 256
116 +#define MPT_SCSI_SG_DEPTH 256
118 #define MPT_SCSI_SG_DEPTH CONFIG_FUSION_MAX_SGE