diff options
Diffstat (limited to 'drivers/scsi/aacraid/linit.c')
-rw-r--r-- | drivers/scsi/aacraid/linit.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index e42a479ce64a..d67058f80816 100644 --- a/drivers/scsi/aacraid/linit.c +++ b/drivers/scsi/aacraid/linit.c | |||
@@ -454,17 +454,17 @@ static int aac_eh_reset(struct scsi_cmnd* cmd) | |||
454 | printk(KERN_ERR "%s: Host adapter reset request. SCSI hang ?\n", | 454 | printk(KERN_ERR "%s: Host adapter reset request. SCSI hang ?\n", |
455 | AAC_DRIVERNAME); | 455 | AAC_DRIVERNAME); |
456 | aac = (struct aac_dev *)host->hostdata; | 456 | aac = (struct aac_dev *)host->hostdata; |
457 | if (aac_adapter_check_health(aac)) { | 457 | |
458 | printk(KERN_ERR "%s: Host adapter appears dead\n", | 458 | if ((count = aac_check_health(aac))) |
459 | AAC_DRIVERNAME); | 459 | return count; |
460 | return -ENODEV; | ||
461 | } | ||
462 | /* | 460 | /* |
463 | * Wait for all commands to complete to this specific | 461 | * Wait for all commands to complete to this specific |
464 | * target (block maximum 60 seconds). | 462 | * target (block maximum 60 seconds). |
465 | */ | 463 | */ |
466 | for (count = 60; count; --count) { | 464 | for (count = 60; count; --count) { |
467 | int active = 0; | 465 | int active = aac->in_reset; |
466 | |||
467 | if (active == 0) | ||
468 | __shost_for_each_device(dev, host) { | 468 | __shost_for_each_device(dev, host) { |
469 | spin_lock_irqsave(&dev->list_lock, flags); | 469 | spin_lock_irqsave(&dev->list_lock, flags); |
470 | list_for_each_entry(command, &dev->cmd_list, list) { | 470 | list_for_each_entry(command, &dev->cmd_list, list) { |
@@ -933,7 +933,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, | |||
933 | else | 933 | else |
934 | shost->max_channel = 0; | 934 | shost->max_channel = 0; |
935 | 935 | ||
936 | aac_get_config_status(aac); | 936 | aac_get_config_status(aac, 0); |
937 | aac_get_containers(aac); | 937 | aac_get_containers(aac); |
938 | list_add(&aac->entry, insert); | 938 | list_add(&aac->entry, insert); |
939 | 939 | ||
@@ -1013,6 +1013,10 @@ static void __devexit aac_remove_one(struct pci_dev *pdev) | |||
1013 | list_del(&aac->entry); | 1013 | list_del(&aac->entry); |
1014 | scsi_host_put(shost); | 1014 | scsi_host_put(shost); |
1015 | pci_disable_device(pdev); | 1015 | pci_disable_device(pdev); |
1016 | if (list_empty(&aac_devices)) { | ||
1017 | unregister_chrdev(aac_cfg_major, "aac"); | ||
1018 | aac_cfg_major = -1; | ||
1019 | } | ||
1016 | } | 1020 | } |
1017 | 1021 | ||
1018 | static struct pci_driver aac_pci_driver = { | 1022 | static struct pci_driver aac_pci_driver = { |