diff options
Diffstat (limited to 'drivers/scsi/aacraid/aachba.c')
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 70 |
1 files changed, 49 insertions, 21 deletions
diff --git a/drivers/scsi/aacraid/aachba.c b/drivers/scsi/aacraid/aachba.c index bfd0e64964ac..c05092fd3a9d 100644 --- a/drivers/scsi/aacraid/aachba.c +++ b/drivers/scsi/aacraid/aachba.c | |||
@@ -144,51 +144,77 @@ static char *aac_get_status_string(u32 status); | |||
144 | */ | 144 | */ |
145 | 145 | ||
146 | static int nondasd = -1; | 146 | static int nondasd = -1; |
147 | static int aac_cache = 0; | 147 | static int aac_cache; |
148 | static int dacmode = -1; | 148 | static int dacmode = -1; |
149 | 149 | int aac_msi; | |
150 | int aac_commit = -1; | 150 | int aac_commit = -1; |
151 | int startup_timeout = 180; | 151 | int startup_timeout = 180; |
152 | int aif_timeout = 120; | 152 | int aif_timeout = 120; |
153 | 153 | ||
154 | module_param(nondasd, int, S_IRUGO|S_IWUSR); | 154 | module_param(nondasd, int, S_IRUGO|S_IWUSR); |
155 | MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices. 0=off, 1=on"); | 155 | MODULE_PARM_DESC(nondasd, "Control scanning of hba for nondasd devices." |
156 | " 0=off, 1=on"); | ||
156 | module_param_named(cache, aac_cache, int, S_IRUGO|S_IWUSR); | 157 | module_param_named(cache, aac_cache, int, S_IRUGO|S_IWUSR); |
157 | MODULE_PARM_DESC(cache, "Disable Queue Flush commands:\n\tbit 0 - Disable FUA in WRITE SCSI commands\n\tbit 1 - Disable SYNCHRONIZE_CACHE SCSI command\n\tbit 2 - Disable only if Battery not protecting Cache"); | 158 | MODULE_PARM_DESC(cache, "Disable Queue Flush commands:\n" |
159 | "\tbit 0 - Disable FUA in WRITE SCSI commands\n" | ||
160 | "\tbit 1 - Disable SYNCHRONIZE_CACHE SCSI command\n" | ||
161 | "\tbit 2 - Disable only if Battery not protecting Cache"); | ||
158 | module_param(dacmode, int, S_IRUGO|S_IWUSR); | 162 | module_param(dacmode, int, S_IRUGO|S_IWUSR); |
159 | MODULE_PARM_DESC(dacmode, "Control whether dma addressing is using 64 bit DAC. 0=off, 1=on"); | 163 | MODULE_PARM_DESC(dacmode, "Control whether dma addressing is using 64 bit DAC." |
164 | " 0=off, 1=on"); | ||
160 | module_param_named(commit, aac_commit, int, S_IRUGO|S_IWUSR); | 165 | module_param_named(commit, aac_commit, int, S_IRUGO|S_IWUSR); |
161 | MODULE_PARM_DESC(commit, "Control whether a COMMIT_CONFIG is issued to the adapter for foreign arrays.\nThis is typically needed in systems that do not have a BIOS. 0=off, 1=on"); | 166 | MODULE_PARM_DESC(commit, "Control whether a COMMIT_CONFIG is issued to the" |
167 | " adapter for foreign arrays.\n" | ||
168 | "This is typically needed in systems that do not have a BIOS." | ||
169 | " 0=off, 1=on"); | ||
170 | module_param_named(msi, aac_msi, int, S_IRUGO|S_IWUSR); | ||
171 | MODULE_PARM_DESC(msi, "IRQ handling." | ||
172 | " 0=PIC(default), 1=MSI, 2=MSI-X(unsupported, uses MSI)"); | ||
162 | module_param(startup_timeout, int, S_IRUGO|S_IWUSR); | 173 | module_param(startup_timeout, int, S_IRUGO|S_IWUSR); |
163 | MODULE_PARM_DESC(startup_timeout, "The duration of time in seconds to wait for adapter to have it's kernel up and\nrunning. This is typically adjusted for large systems that do not have a BIOS."); | 174 | MODULE_PARM_DESC(startup_timeout, "The duration of time in seconds to wait for" |
175 | " adapter to have it's kernel up and\n" | ||
176 | "running. This is typically adjusted for large systems that do not" | ||
177 | " have a BIOS."); | ||
164 | module_param(aif_timeout, int, S_IRUGO|S_IWUSR); | 178 | module_param(aif_timeout, int, S_IRUGO|S_IWUSR); |
165 | MODULE_PARM_DESC(aif_timeout, "The duration of time in seconds to wait for applications to pick up AIFs before\nderegistering them. This is typically adjusted for heavily burdened systems."); | 179 | MODULE_PARM_DESC(aif_timeout, "The duration of time in seconds to wait for" |
180 | " applications to pick up AIFs before\n" | ||
181 | "deregistering them. This is typically adjusted for heavily burdened" | ||
182 | " systems."); | ||
166 | 183 | ||
167 | int numacb = -1; | 184 | int numacb = -1; |
168 | module_param(numacb, int, S_IRUGO|S_IWUSR); | 185 | module_param(numacb, int, S_IRUGO|S_IWUSR); |
169 | MODULE_PARM_DESC(numacb, "Request a limit to the number of adapter control blocks (FIB) allocated. Valid values are 512 and down. Default is to use suggestion from Firmware."); | 186 | MODULE_PARM_DESC(numacb, "Request a limit to the number of adapter control" |
187 | " blocks (FIB) allocated. Valid values are 512 and down. Default is" | ||
188 | " to use suggestion from Firmware."); | ||
170 | 189 | ||
171 | int acbsize = -1; | 190 | int acbsize = -1; |
172 | module_param(acbsize, int, S_IRUGO|S_IWUSR); | 191 | module_param(acbsize, int, S_IRUGO|S_IWUSR); |
173 | MODULE_PARM_DESC(acbsize, "Request a specific adapter control block (FIB) size. Valid values are 512, 2048, 4096 and 8192. Default is to use suggestion from Firmware."); | 192 | MODULE_PARM_DESC(acbsize, "Request a specific adapter control block (FIB)" |
193 | " size. Valid values are 512, 2048, 4096 and 8192. Default is to use" | ||
194 | " suggestion from Firmware."); | ||
174 | 195 | ||
175 | int update_interval = 30 * 60; | 196 | int update_interval = 30 * 60; |
176 | module_param(update_interval, int, S_IRUGO|S_IWUSR); | 197 | module_param(update_interval, int, S_IRUGO|S_IWUSR); |
177 | MODULE_PARM_DESC(update_interval, "Interval in seconds between time sync updates issued to adapter."); | 198 | MODULE_PARM_DESC(update_interval, "Interval in seconds between time sync" |
199 | " updates issued to adapter."); | ||
178 | 200 | ||
179 | int check_interval = 24 * 60 * 60; | 201 | int check_interval = 24 * 60 * 60; |
180 | module_param(check_interval, int, S_IRUGO|S_IWUSR); | 202 | module_param(check_interval, int, S_IRUGO|S_IWUSR); |
181 | MODULE_PARM_DESC(check_interval, "Interval in seconds between adapter health checks."); | 203 | MODULE_PARM_DESC(check_interval, "Interval in seconds between adapter health" |
204 | " checks."); | ||
182 | 205 | ||
183 | int aac_check_reset = 1; | 206 | int aac_check_reset = 1; |
184 | module_param_named(check_reset, aac_check_reset, int, S_IRUGO|S_IWUSR); | 207 | module_param_named(check_reset, aac_check_reset, int, S_IRUGO|S_IWUSR); |
185 | MODULE_PARM_DESC(aac_check_reset, "If adapter fails health check, reset the adapter. a value of -1 forces the reset to adapters programmed to ignore it."); | 208 | MODULE_PARM_DESC(aac_check_reset, "If adapter fails health check, reset the" |
209 | " adapter. a value of -1 forces the reset to adapters programmed to" | ||
210 | " ignore it."); | ||
186 | 211 | ||
187 | int expose_physicals = -1; | 212 | int expose_physicals = -1; |
188 | module_param(expose_physicals, int, S_IRUGO|S_IWUSR); | 213 | module_param(expose_physicals, int, S_IRUGO|S_IWUSR); |
189 | MODULE_PARM_DESC(expose_physicals, "Expose physical components of the arrays. -1=protect 0=off, 1=on"); | 214 | MODULE_PARM_DESC(expose_physicals, "Expose physical components of the arrays." |
215 | " -1=protect 0=off, 1=on"); | ||
190 | 216 | ||
191 | int aac_reset_devices = 0; | 217 | int aac_reset_devices; |
192 | module_param_named(reset_devices, aac_reset_devices, int, S_IRUGO|S_IWUSR); | 218 | module_param_named(reset_devices, aac_reset_devices, int, S_IRUGO|S_IWUSR); |
193 | MODULE_PARM_DESC(reset_devices, "Force an adapter reset at initialization."); | 219 | MODULE_PARM_DESC(reset_devices, "Force an adapter reset at initialization."); |
194 | 220 | ||
@@ -1315,7 +1341,7 @@ int aac_get_adapter_info(struct aac_dev* dev) | |||
1315 | (int)sizeof(dev->supplement_adapter_info.VpdInfo.Tsid), | 1341 | (int)sizeof(dev->supplement_adapter_info.VpdInfo.Tsid), |
1316 | dev->supplement_adapter_info.VpdInfo.Tsid); | 1342 | dev->supplement_adapter_info.VpdInfo.Tsid); |
1317 | } | 1343 | } |
1318 | if (!aac_check_reset || ((aac_check_reset != 1) && | 1344 | if (!aac_check_reset || ((aac_check_reset == 1) && |
1319 | (dev->supplement_adapter_info.SupportedOptions2 & | 1345 | (dev->supplement_adapter_info.SupportedOptions2 & |
1320 | AAC_OPTION_IGNORE_RESET))) { | 1346 | AAC_OPTION_IGNORE_RESET))) { |
1321 | printk(KERN_INFO "%s%d: Reset Adapter Ignored\n", | 1347 | printk(KERN_INFO "%s%d: Reset Adapter Ignored\n", |
@@ -1353,13 +1379,14 @@ int aac_get_adapter_info(struct aac_dev* dev) | |||
1353 | 1379 | ||
1354 | if (nondasd != -1) | 1380 | if (nondasd != -1) |
1355 | dev->nondasd_support = (nondasd!=0); | 1381 | dev->nondasd_support = (nondasd!=0); |
1356 | if(dev->nondasd_support != 0) { | 1382 | if (dev->nondasd_support && !dev->in_reset) |
1357 | printk(KERN_INFO "%s%d: Non-DASD support enabled.\n",dev->name, dev->id); | 1383 | printk(KERN_INFO "%s%d: Non-DASD support enabled.\n",dev->name, dev->id); |
1358 | } | ||
1359 | 1384 | ||
1360 | dev->dac_support = 0; | 1385 | dev->dac_support = 0; |
1361 | if( (sizeof(dma_addr_t) > 4) && (dev->adapter_info.options & AAC_OPT_SGMAP_HOST64)){ | 1386 | if( (sizeof(dma_addr_t) > 4) && (dev->adapter_info.options & AAC_OPT_SGMAP_HOST64)){ |
1362 | printk(KERN_INFO "%s%d: 64bit support enabled.\n", dev->name, dev->id); | 1387 | if (!dev->in_reset) |
1388 | printk(KERN_INFO "%s%d: 64bit support enabled.\n", | ||
1389 | dev->name, dev->id); | ||
1363 | dev->dac_support = 1; | 1390 | dev->dac_support = 1; |
1364 | } | 1391 | } |
1365 | 1392 | ||
@@ -1369,8 +1396,9 @@ int aac_get_adapter_info(struct aac_dev* dev) | |||
1369 | if(dev->dac_support != 0) { | 1396 | if(dev->dac_support != 0) { |
1370 | if (!pci_set_dma_mask(dev->pdev, DMA_64BIT_MASK) && | 1397 | if (!pci_set_dma_mask(dev->pdev, DMA_64BIT_MASK) && |
1371 | !pci_set_consistent_dma_mask(dev->pdev, DMA_64BIT_MASK)) { | 1398 | !pci_set_consistent_dma_mask(dev->pdev, DMA_64BIT_MASK)) { |
1372 | printk(KERN_INFO"%s%d: 64 Bit DAC enabled\n", | 1399 | if (!dev->in_reset) |
1373 | dev->name, dev->id); | 1400 | printk(KERN_INFO"%s%d: 64 Bit DAC enabled\n", |
1401 | dev->name, dev->id); | ||
1374 | } else if (!pci_set_dma_mask(dev->pdev, DMA_32BIT_MASK) && | 1402 | } else if (!pci_set_dma_mask(dev->pdev, DMA_32BIT_MASK) && |
1375 | !pci_set_consistent_dma_mask(dev->pdev, DMA_32BIT_MASK)) { | 1403 | !pci_set_consistent_dma_mask(dev->pdev, DMA_32BIT_MASK)) { |
1376 | printk(KERN_INFO"%s%d: DMA mask set failed, 64 Bit DAC disabled\n", | 1404 | printk(KERN_INFO"%s%d: DMA mask set failed, 64 Bit DAC disabled\n", |