1 Index: linux-4.4.59-1/block/blk-settings.c
2 ===================================================================
3 --- linux-4.4.59-1.orig/block/blk-settings.c
4 +++ linux-4.4.59-1/block/blk-settings.c
5 @@ -20,6 +20,12 @@ EXPORT_SYMBOL(blk_max_low_pfn);
7 unsigned long blk_max_pfn;
9 +int default_max_sectors = BLK_DEF_MAX_SECTORS;
10 +module_param(default_max_sectors, int, 0);
12 +int default_max_segments = BLK_MAX_SEGMENTS;
13 +module_param(default_max_segments, int, 0);
16 * blk_queue_prep_rq - set a prepare_request function for queue
18 @@ -87,7 +93,7 @@ EXPORT_SYMBOL_GPL(blk_queue_lld_busy);
20 void blk_set_default_limits(struct queue_limits *lim)
22 - lim->max_segments = BLK_MAX_SEGMENTS;
23 + lim->max_segments = default_max_segments;
24 lim->max_integrity_segments = 0;
25 lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;
26 lim->virt_boundary_mask = 0;
27 @@ -251,7 +257,7 @@ void blk_queue_max_hw_sectors(struct req
29 limits->max_hw_sectors = max_hw_sectors;
30 max_sectors = min_not_zero(max_hw_sectors, limits->max_dev_sectors);
31 - max_sectors = min_t(unsigned int, max_sectors, BLK_DEF_MAX_SECTORS);
32 + max_sectors = min_t(unsigned int, max_sectors, default_max_sectors);
33 limits->max_sectors = max_sectors;
34 q->backing_dev_info->io_pages = max_sectors >> (PAGE_SHIFT - 9);
36 Index: linux-4.4.59-1/drivers/scsi/Kconfig
37 ===================================================================
38 --- linux-4.4.59-1.orig/drivers/scsi/Kconfig
39 +++ linux-4.4.59-1/drivers/scsi/Kconfig
40 @@ -236,6 +236,24 @@ config SCSI_LOGGING
41 there should be no noticeable performance impact as long as you have
44 +config SCSI_MAX_SG_SEGMENTS
45 + int "Maximum SCSI scatter gather segment size"
50 + Control the maximum limit for scatter gather buffers for the
53 +config SCSI_MAX_SG_SEGMENTS
54 + int "Maximum SCSI scatter gather segment size"
59 + Control the maximum limit for scatter gather buffers for the
62 config SCSI_SCAN_ASYNC
63 bool "Asynchronous SCSI scanning"
65 Index: linux-4.4.59-1/drivers/message/fusion/Kconfig
66 ===================================================================
67 --- linux-4.4.59-1.orig/drivers/message/fusion/Kconfig
68 +++ linux-4.4.59-1/drivers/message/fusion/Kconfig
69 @@ -61,9 +61,9 @@ config FUSION_SAS
73 - int "Maximum number of scatter gather entries (16 - 128)"
76 + int "Maximum number of scatter gather entries (16 - 256)"
80 This option allows you to specify the maximum number of scatter-
81 gather entries per I/O. The driver default is 128, which matches
82 Index: linux-4.4.59-1/drivers/message/fusion/mptbase.h
83 ===================================================================
84 --- linux-4.4.59-1.orig/drivers/message/fusion/mptbase.h
85 +++ linux-4.4.59-1/drivers/message/fusion/mptbase.h
87 * Set the MAX_SGE value based on user input.
89 #ifdef CONFIG_FUSION_MAX_SGE
90 -#if CONFIG_FUSION_MAX_SGE < 16
91 +#if CONFIG_FUSION_MAX_SGE < 16
92 #define MPT_SCSI_SG_DEPTH 16
93 -#elif CONFIG_FUSION_MAX_SGE > 128
94 -#define MPT_SCSI_SG_DEPTH 128
95 +#elif CONFIG_FUSION_MAX_SGE > 256
96 +#define MPT_SCSI_SG_DEPTH 256
98 #define MPT_SCSI_SG_DEPTH CONFIG_FUSION_MAX_SGE