aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/message/fusion
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/message/fusion')
-rw-r--r--drivers/message/fusion/mptsas.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/message/fusion/mptsas.c b/drivers/message/fusion/mptsas.c
index 7596aecd5072..73229ff9cafa 100644
--- a/drivers/message/fusion/mptsas.c
+++ b/drivers/message/fusion/mptsas.c
@@ -92,6 +92,11 @@ static int max_lun = MPTSAS_MAX_LUN;
92module_param(max_lun, int, 0); 92module_param(max_lun, int, 0);
93MODULE_PARM_DESC(max_lun, " max lun, default=16895 "); 93MODULE_PARM_DESC(max_lun, " max lun, default=16895 ");
94 94
95static int mpt_loadtime_max_sectors = 8192;
96module_param(mpt_loadtime_max_sectors, int, 0);
97MODULE_PARM_DESC(mpt_loadtime_max_sectors,
98 " Maximum sector define for Host Bus Adaptor.Range 64 to 8192 default=8192");
99
95static u8 mptsasDoneCtx = MPT_MAX_PROTOCOL_DRIVERS; 100static u8 mptsasDoneCtx = MPT_MAX_PROTOCOL_DRIVERS;
96static u8 mptsasTaskCtx = MPT_MAX_PROTOCOL_DRIVERS; 101static u8 mptsasTaskCtx = MPT_MAX_PROTOCOL_DRIVERS;
97static u8 mptsasInternalCtx = MPT_MAX_PROTOCOL_DRIVERS; /* Used only for internal commands */ 102static u8 mptsasInternalCtx = MPT_MAX_PROTOCOL_DRIVERS; /* Used only for internal commands */
@@ -5239,6 +5244,21 @@ mptsas_probe(struct pci_dev *pdev, const struct pci_device_id *id)
5239 sh->sg_tablesize = numSGE; 5244 sh->sg_tablesize = numSGE;
5240 } 5245 }
5241 5246
5247 if (mpt_loadtime_max_sectors) {
5248 if (mpt_loadtime_max_sectors < 64 ||
5249 mpt_loadtime_max_sectors > 8192) {
5250 printk(MYIOC_s_INFO_FMT "Invalid value passed for"
5251 "mpt_loadtime_max_sectors %d."
5252 "Range from 64 to 8192\n", ioc->name,
5253 mpt_loadtime_max_sectors);
5254 }
5255 mpt_loadtime_max_sectors &= 0xFFFFFFFE;
5256 dprintk(ioc, printk(MYIOC_s_DEBUG_FMT
5257 "Resetting max sector to %d from %d\n",
5258 ioc->name, mpt_loadtime_max_sectors, sh->max_sectors));
5259 sh->max_sectors = mpt_loadtime_max_sectors;
5260 }
5261
5242 hd = shost_priv(sh); 5262 hd = shost_priv(sh);
5243 hd->ioc = ioc; 5263 hd->ioc = ioc;
5244 5264