diff options
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r-- | drivers/scsi/aacraid/aachba.c | 70 | ||||
-rw-r--r-- | drivers/scsi/aacraid/aacraid.h | 2 | ||||
-rw-r--r-- | drivers/scsi/aacraid/commsup.c | 2 | ||||
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 47 | ||||
-rw-r--r-- | drivers/scsi/aacraid/rx.c | 5 | ||||
-rw-r--r-- | drivers/scsi/aacraid/sa.c | 5 |
6 files changed, 84 insertions, 47 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", |
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h index 3195d29f2177..ace0b751c131 100644 --- a/drivers/scsi/aacraid/aacraid.h +++ b/drivers/scsi/aacraid/aacraid.h | |||
@@ -1026,6 +1026,7 @@ struct aac_dev | |||
1026 | u8 raw_io_64; | 1026 | u8 raw_io_64; |
1027 | u8 printf_enabled; | 1027 | u8 printf_enabled; |
1028 | u8 in_reset; | 1028 | u8 in_reset; |
1029 | u8 msi; | ||
1029 | }; | 1030 | }; |
1030 | 1031 | ||
1031 | #define aac_adapter_interrupt(dev) \ | 1032 | #define aac_adapter_interrupt(dev) \ |
@@ -1881,6 +1882,7 @@ extern int startup_timeout; | |||
1881 | extern int aif_timeout; | 1882 | extern int aif_timeout; |
1882 | extern int expose_physicals; | 1883 | extern int expose_physicals; |
1883 | extern int aac_reset_devices; | 1884 | extern int aac_reset_devices; |
1885 | extern int aac_msi; | ||
1884 | extern int aac_commit; | 1886 | extern int aac_commit; |
1885 | extern int update_interval; | 1887 | extern int update_interval; |
1886 | extern int check_interval; | 1888 | extern int check_interval; |
diff --git a/drivers/scsi/aacraid/commsup.c b/drivers/scsi/aacraid/commsup.c index 81b36923e0ef..47434499e82b 100644 --- a/drivers/scsi/aacraid/commsup.c +++ b/drivers/scsi/aacraid/commsup.c | |||
@@ -1458,7 +1458,7 @@ int aac_check_health(struct aac_dev * aac) | |||
1458 | 1458 | ||
1459 | printk(KERN_ERR "%s: Host adapter BLINK LED 0x%x\n", aac->name, BlinkLED); | 1459 | printk(KERN_ERR "%s: Host adapter BLINK LED 0x%x\n", aac->name, BlinkLED); |
1460 | 1460 | ||
1461 | if (!aac_check_reset || ((aac_check_reset != 1) && | 1461 | if (!aac_check_reset || ((aac_check_reset == 1) && |
1462 | (aac->supplement_adapter_info.SupportedOptions2 & | 1462 | (aac->supplement_adapter_info.SupportedOptions2 & |
1463 | AAC_OPTION_IGNORE_RESET))) | 1463 | AAC_OPTION_IGNORE_RESET))) |
1464 | goto out; | 1464 | goto out; |
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index e80d2a0c46af..ae5f74fb62d5 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -275,9 +275,9 @@ static const char *aac_info(struct Scsi_Host *shost) | |||
275 | 275 | ||
276 | /** | 276 | /** |
277 | * aac_get_driver_ident | 277 | * aac_get_driver_ident |
278 | * @devtype: index into lookup table | 278 | * @devtype: index into lookup table |
279 | * | 279 | * |
280 | * Returns a pointer to the entry in the driver lookup table. | 280 | * Returns a pointer to the entry in the driver lookup table. |
281 | */ | 281 | */ |
282 | 282 | ||
283 | struct aac_driver_ident* aac_get_driver_ident(int devtype) | 283 | struct aac_driver_ident* aac_get_driver_ident(int devtype) |
@@ -494,13 +494,14 @@ static int aac_change_queue_depth(struct scsi_device *sdev, int depth) | |||
494 | 494 | ||
495 | static ssize_t aac_show_raid_level(struct device *dev, struct device_attribute *attr, char *buf) | 495 | static ssize_t aac_show_raid_level(struct device *dev, struct device_attribute *attr, char *buf) |
496 | { | 496 | { |
497 | struct scsi_device * sdev = to_scsi_device(dev); | 497 | struct scsi_device *sdev = to_scsi_device(dev); |
498 | struct aac_dev *aac = (struct aac_dev *)(sdev->host->hostdata); | ||
498 | if (sdev_channel(sdev) != CONTAINER_CHANNEL) | 499 | if (sdev_channel(sdev) != CONTAINER_CHANNEL) |
499 | return snprintf(buf, PAGE_SIZE, sdev->no_uld_attach | 500 | return snprintf(buf, PAGE_SIZE, sdev->no_uld_attach |
500 | ? "Hidden\n" : "JBOD"); | 501 | ? "Hidden\n" : |
502 | ((aac->jbod && (sdev->type == TYPE_DISK)) ? "JBOD\n" : "")); | ||
501 | return snprintf(buf, PAGE_SIZE, "%s\n", | 503 | return snprintf(buf, PAGE_SIZE, "%s\n", |
502 | get_container_type(((struct aac_dev *)(sdev->host->hostdata)) | 504 | get_container_type(aac->fsa_dev[sdev_id(sdev)].type)); |
503 | ->fsa_dev[sdev_id(sdev)].type)); | ||
504 | } | 505 | } |
505 | 506 | ||
506 | static struct device_attribute aac_raid_level_attr = { | 507 | static struct device_attribute aac_raid_level_attr = { |
@@ -641,7 +642,7 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) | |||
641 | AAC_OPTION_MU_RESET) && | 642 | AAC_OPTION_MU_RESET) && |
642 | aac_check_reset && | 643 | aac_check_reset && |
643 | ((aac_check_reset != 1) || | 644 | ((aac_check_reset != 1) || |
644 | (aac->supplement_adapter_info.SupportedOptions2 & | 645 | !(aac->supplement_adapter_info.SupportedOptions2 & |
645 | AAC_OPTION_IGNORE_RESET))) | 646 | AAC_OPTION_IGNORE_RESET))) |
646 | aac_reset_adapter(aac, 2); /* Bypass wait for command quiesce */ | 647 | aac_reset_adapter(aac, 2); /* Bypass wait for command quiesce */ |
647 | return SUCCESS; /* Cause an immediate retry of the command with a ten second delay after successful tur */ | 648 | return SUCCESS; /* Cause an immediate retry of the command with a ten second delay after successful tur */ |
@@ -860,8 +861,8 @@ ssize_t aac_show_serial_number(struct class_device *class_dev, char *buf) | |||
860 | le32_to_cpu(dev->adapter_info.serial[0])); | 861 | le32_to_cpu(dev->adapter_info.serial[0])); |
861 | if (len && | 862 | if (len && |
862 | !memcmp(&dev->supplement_adapter_info.MfgPcbaSerialNo[ | 863 | !memcmp(&dev->supplement_adapter_info.MfgPcbaSerialNo[ |
863 | sizeof(dev->supplement_adapter_info.MfgPcbaSerialNo)+2-len], | 864 | sizeof(dev->supplement_adapter_info.MfgPcbaSerialNo)-len], |
864 | buf, len)) | 865 | buf, len-1)) |
865 | len = snprintf(buf, PAGE_SIZE, "%.*s\n", | 866 | len = snprintf(buf, PAGE_SIZE, "%.*s\n", |
866 | (int)sizeof(dev->supplement_adapter_info.MfgPcbaSerialNo), | 867 | (int)sizeof(dev->supplement_adapter_info.MfgPcbaSerialNo), |
867 | dev->supplement_adapter_info.MfgPcbaSerialNo); | 868 | dev->supplement_adapter_info.MfgPcbaSerialNo); |
@@ -1004,32 +1005,32 @@ static const struct file_operations aac_cfg_fops = { | |||
1004 | 1005 | ||
1005 | static struct scsi_host_template aac_driver_template = { | 1006 | static struct scsi_host_template aac_driver_template = { |
1006 | .module = THIS_MODULE, | 1007 | .module = THIS_MODULE, |
1007 | .name = "AAC", | 1008 | .name = "AAC", |
1008 | .proc_name = AAC_DRIVERNAME, | 1009 | .proc_name = AAC_DRIVERNAME, |
1009 | .info = aac_info, | 1010 | .info = aac_info, |
1010 | .ioctl = aac_ioctl, | 1011 | .ioctl = aac_ioctl, |
1011 | #ifdef CONFIG_COMPAT | 1012 | #ifdef CONFIG_COMPAT |
1012 | .compat_ioctl = aac_compat_ioctl, | 1013 | .compat_ioctl = aac_compat_ioctl, |
1013 | #endif | 1014 | #endif |
1014 | .queuecommand = aac_queuecommand, | 1015 | .queuecommand = aac_queuecommand, |
1015 | .bios_param = aac_biosparm, | 1016 | .bios_param = aac_biosparm, |
1016 | .shost_attrs = aac_attrs, | 1017 | .shost_attrs = aac_attrs, |
1017 | .slave_configure = aac_slave_configure, | 1018 | .slave_configure = aac_slave_configure, |
1018 | .change_queue_depth = aac_change_queue_depth, | 1019 | .change_queue_depth = aac_change_queue_depth, |
1019 | .sdev_attrs = aac_dev_attrs, | 1020 | .sdev_attrs = aac_dev_attrs, |
1020 | .eh_abort_handler = aac_eh_abort, | 1021 | .eh_abort_handler = aac_eh_abort, |
1021 | .eh_host_reset_handler = aac_eh_reset, | 1022 | .eh_host_reset_handler = aac_eh_reset, |
1022 | .can_queue = AAC_NUM_IO_FIB, | 1023 | .can_queue = AAC_NUM_IO_FIB, |
1023 | .this_id = MAXIMUM_NUM_CONTAINERS, | 1024 | .this_id = MAXIMUM_NUM_CONTAINERS, |
1024 | .sg_tablesize = 16, | 1025 | .sg_tablesize = 16, |
1025 | .max_sectors = 128, | 1026 | .max_sectors = 128, |
1026 | #if (AAC_NUM_IO_FIB > 256) | 1027 | #if (AAC_NUM_IO_FIB > 256) |
1027 | .cmd_per_lun = 256, | 1028 | .cmd_per_lun = 256, |
1028 | #else | 1029 | #else |
1029 | .cmd_per_lun = AAC_NUM_IO_FIB, | 1030 | .cmd_per_lun = AAC_NUM_IO_FIB, |
1030 | #endif | 1031 | #endif |
1031 | .use_clustering = ENABLE_CLUSTERING, | 1032 | .use_clustering = ENABLE_CLUSTERING, |
1032 | .emulated = 1, | 1033 | .emulated = 1, |
1033 | }; | 1034 | }; |
1034 | 1035 | ||
1035 | static void __aac_shutdown(struct aac_dev * aac) | 1036 | static void __aac_shutdown(struct aac_dev * aac) |
@@ -1039,6 +1040,8 @@ static void __aac_shutdown(struct aac_dev * aac) | |||
1039 | aac_send_shutdown(aac); | 1040 | aac_send_shutdown(aac); |
1040 | aac_adapter_disable_int(aac); | 1041 | aac_adapter_disable_int(aac); |
1041 | free_irq(aac->pdev->irq, aac); | 1042 | free_irq(aac->pdev->irq, aac); |
1043 | if (aac->msi) | ||
1044 | pci_disable_msi(aac->pdev); | ||
1042 | } | 1045 | } |
1043 | 1046 | ||
1044 | static int __devinit aac_probe_one(struct pci_dev *pdev, | 1047 | static int __devinit aac_probe_one(struct pci_dev *pdev, |
@@ -1254,7 +1257,7 @@ static struct pci_driver aac_pci_driver = { | |||
1254 | .id_table = aac_pci_tbl, | 1257 | .id_table = aac_pci_tbl, |
1255 | .probe = aac_probe_one, | 1258 | .probe = aac_probe_one, |
1256 | .remove = __devexit_p(aac_remove_one), | 1259 | .remove = __devexit_p(aac_remove_one), |
1257 | .shutdown = aac_shutdown, | 1260 | .shutdown = aac_shutdown, |
1258 | }; | 1261 | }; |
1259 | 1262 | ||
1260 | static int __init aac_init(void) | 1263 | static int __init aac_init(void) |
@@ -1271,7 +1274,7 @@ static int __init aac_init(void) | |||
1271 | aac_cfg_major = register_chrdev( 0, "aac", &aac_cfg_fops); | 1274 | aac_cfg_major = register_chrdev( 0, "aac", &aac_cfg_fops); |
1272 | if (aac_cfg_major < 0) { | 1275 | if (aac_cfg_major < 0) { |
1273 | printk(KERN_WARNING | 1276 | printk(KERN_WARNING |
1274 | "aacraid: unable to register \"aac\" device.\n"); | 1277 | "aacraid: unable to register \"aac\" device.\n"); |
1275 | } | 1278 | } |
1276 | 1279 | ||
1277 | return 0; | 1280 | return 0; |
diff --git a/drivers/scsi/aacraid/rx.c b/drivers/scsi/aacraid/rx.c index a08bbf1fd76c..1f18b83e1e02 100644 --- a/drivers/scsi/aacraid/rx.c +++ b/drivers/scsi/aacraid/rx.c | |||
@@ -625,8 +625,11 @@ int _aac_rx_init(struct aac_dev *dev) | |||
625 | if (aac_init_adapter(dev) == NULL) | 625 | if (aac_init_adapter(dev) == NULL) |
626 | goto error_iounmap; | 626 | goto error_iounmap; |
627 | aac_adapter_comm(dev, dev->comm_interface); | 627 | aac_adapter_comm(dev, dev->comm_interface); |
628 | if (request_irq(dev->scsi_host_ptr->irq, dev->a_ops.adapter_intr, | 628 | dev->msi = aac_msi && !pci_enable_msi(dev->pdev); |
629 | if (request_irq(dev->pdev->irq, dev->a_ops.adapter_intr, | ||
629 | IRQF_SHARED|IRQF_DISABLED, "aacraid", dev) < 0) { | 630 | IRQF_SHARED|IRQF_DISABLED, "aacraid", dev) < 0) { |
631 | if (dev->msi) | ||
632 | pci_disable_msi(dev->pdev); | ||
630 | printk(KERN_ERR "%s%d: Interrupt unavailable.\n", | 633 | printk(KERN_ERR "%s%d: Interrupt unavailable.\n", |
631 | name, instance); | 634 | name, instance); |
632 | goto error_iounmap; | 635 | goto error_iounmap; |
diff --git a/drivers/scsi/aacraid/sa.c b/drivers/scsi/aacraid/sa.c index 85b91bc578c9..cfc3410ec073 100644 --- a/drivers/scsi/aacraid/sa.c +++ b/drivers/scsi/aacraid/sa.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/kernel.h> | 31 | #include <linux/kernel.h> |
32 | #include <linux/init.h> | 32 | #include <linux/init.h> |
33 | #include <linux/types.h> | 33 | #include <linux/types.h> |
34 | #include <linux/pci.h> | ||
34 | #include <linux/spinlock.h> | 35 | #include <linux/spinlock.h> |
35 | #include <linux/slab.h> | 36 | #include <linux/slab.h> |
36 | #include <linux/blkdev.h> | 37 | #include <linux/blkdev.h> |
@@ -385,7 +386,7 @@ int aac_sa_init(struct aac_dev *dev) | |||
385 | 386 | ||
386 | if(aac_init_adapter(dev) == NULL) | 387 | if(aac_init_adapter(dev) == NULL) |
387 | goto error_irq; | 388 | goto error_irq; |
388 | if (request_irq(dev->scsi_host_ptr->irq, dev->a_ops.adapter_intr, | 389 | if (request_irq(dev->pdev->irq, dev->a_ops.adapter_intr, |
389 | IRQF_SHARED|IRQF_DISABLED, | 390 | IRQF_SHARED|IRQF_DISABLED, |
390 | "aacraid", (void *)dev ) < 0) { | 391 | "aacraid", (void *)dev ) < 0) { |
391 | printk(KERN_WARNING "%s%d: Interrupt unavailable.\n", | 392 | printk(KERN_WARNING "%s%d: Interrupt unavailable.\n", |
@@ -403,7 +404,7 @@ int aac_sa_init(struct aac_dev *dev) | |||
403 | 404 | ||
404 | error_irq: | 405 | error_irq: |
405 | aac_sa_disable_interrupt(dev); | 406 | aac_sa_disable_interrupt(dev); |
406 | free_irq(dev->scsi_host_ptr->irq, (void *)dev); | 407 | free_irq(dev->pdev->irq, (void *)dev); |
407 | 408 | ||
408 | error_iounmap: | 409 | error_iounmap: |
409 | 410 | ||