aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid
diff options
context:
space:
mode:
authorSalyzyn, Mark <mark_salyzyn@adaptec.com>2007-05-30 11:59:13 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-06-01 11:42:19 -0400
commit94774a3a8e01989960aaadaea6deff51a4e7deed (patch)
tree7b482d61cec03edf5852f3b005e319ee61b2d46a /drivers/scsi/aacraid
parent88f5774b0748d6d9ebec7a39caae98c0d83b8cc8 (diff)
[SCSI] aacraid: fix shutdown handler to also disable interrupts.
Moves quiesce, thread and interrupt shutdown into aacraid drivers' .shutdown handler. This fix to the aac_shutdown handler will remove the superfluous reset of the adapter during a (clean) kexec. This fix may mitigate the active investigation 'kexec and aacraid broken' but it is unlikely to affect the root cause (issue likely present in both kexec and kdump). This patch reduces the chance the problem will occur with a kexec. The fix for root cause is currently expected to be the minimum value check to the aacraid.startup_timeout driver variable after an adapter reset within aacraid_commit_reset.patch submitted on 05/22/2007 and awaiting testing by Yinghai to confirm. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid')
-rw-r--r--drivers/scsi/aacraid/linit.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c
index 350ea7feb61d..5c487ff096c7 100644
--- a/drivers/scsi/aacraid/linit.c
+++ b/drivers/scsi/aacraid/linit.c
@@ -863,6 +863,14 @@ static struct scsi_host_template aac_driver_template = {
863 .emulated = 1, 863 .emulated = 1,
864}; 864};
865 865
866static void __aac_shutdown(struct aac_dev * aac)
867{
868 kthread_stop(aac->thread);
869 aac_send_shutdown(aac);
870 aac_adapter_disable_int(aac);
871 free_irq(aac->pdev->irq, aac);
872}
873
866static int __devinit aac_probe_one(struct pci_dev *pdev, 874static int __devinit aac_probe_one(struct pci_dev *pdev,
867 const struct pci_device_id *id) 875 const struct pci_device_id *id)
868{ 876{
@@ -1015,10 +1023,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev,
1015 return 0; 1023 return 0;
1016 1024
1017 out_deinit: 1025 out_deinit:
1018 kthread_stop(aac->thread); 1026 __aac_shutdown(aac);
1019 aac_send_shutdown(aac);
1020 aac_adapter_disable_int(aac);
1021 free_irq(pdev->irq, aac);
1022 out_unmap: 1027 out_unmap:
1023 aac_fib_map_free(aac); 1028 aac_fib_map_free(aac);
1024 pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); 1029 pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys);
@@ -1038,7 +1043,8 @@ static void aac_shutdown(struct pci_dev *dev)
1038{ 1043{
1039 struct Scsi_Host *shost = pci_get_drvdata(dev); 1044 struct Scsi_Host *shost = pci_get_drvdata(dev);
1040 struct aac_dev *aac = (struct aac_dev *)shost->hostdata; 1045 struct aac_dev *aac = (struct aac_dev *)shost->hostdata;
1041 aac_send_shutdown(aac); 1046 scsi_block_requests(shost);
1047 __aac_shutdown(aac);
1042} 1048}
1043 1049
1044static void __devexit aac_remove_one(struct pci_dev *pdev) 1050static void __devexit aac_remove_one(struct pci_dev *pdev)
@@ -1048,16 +1054,12 @@ static void __devexit aac_remove_one(struct pci_dev *pdev)
1048 1054
1049 scsi_remove_host(shost); 1055 scsi_remove_host(shost);
1050 1056
1051 kthread_stop(aac->thread); 1057 __aac_shutdown(aac);
1052
1053 aac_send_shutdown(aac);
1054 aac_adapter_disable_int(aac);
1055 aac_fib_map_free(aac); 1058 aac_fib_map_free(aac);
1056 pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, 1059 pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr,
1057 aac->comm_phys); 1060 aac->comm_phys);
1058 kfree(aac->queues); 1061 kfree(aac->queues);
1059 1062
1060 free_irq(pdev->irq, aac);
1061 aac_adapter_ioremap(aac, 0); 1063 aac_adapter_ioremap(aac, 0);
1062 1064
1063 kfree(aac->fibs); 1065 kfree(aac->fibs);