From 94774a3a8e01989960aaadaea6deff51a4e7deed Mon Sep 17 00:00:00 2001 From: "Salyzyn, Mark" Date: Wed, 30 May 2007 11:59:13 -0400 Subject: [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 Signed-off-by: James Bottomley --- drivers/scsi/aacraid/linit.c | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'drivers/scsi') diff --git a/drivers/scsi/aacraid/linit.c b/drivers/scsi/aacraid/linit.c index 350ea7feb61..5c487ff096c 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 = { .emulated = 1, }; +static void __aac_shutdown(struct aac_dev * aac) +{ + kthread_stop(aac->thread); + aac_send_shutdown(aac); + aac_adapter_disable_int(aac); + free_irq(aac->pdev->irq, aac); +} + static int __devinit aac_probe_one(struct pci_dev *pdev, const struct pci_device_id *id) { @@ -1015,10 +1023,7 @@ static int __devinit aac_probe_one(struct pci_dev *pdev, return 0; out_deinit: - kthread_stop(aac->thread); - aac_send_shutdown(aac); - aac_adapter_disable_int(aac); - free_irq(pdev->irq, aac); + __aac_shutdown(aac); out_unmap: aac_fib_map_free(aac); 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) { struct Scsi_Host *shost = pci_get_drvdata(dev); struct aac_dev *aac = (struct aac_dev *)shost->hostdata; - aac_send_shutdown(aac); + scsi_block_requests(shost); + __aac_shutdown(aac); } static void __devexit aac_remove_one(struct pci_dev *pdev) @@ -1048,16 +1054,12 @@ static void __devexit aac_remove_one(struct pci_dev *pdev) scsi_remove_host(shost); - kthread_stop(aac->thread); - - aac_send_shutdown(aac); - aac_adapter_disable_int(aac); + __aac_shutdown(aac); aac_fib_map_free(aac); pci_free_consistent(aac->pdev, aac->comm_size, aac->comm_addr, aac->comm_phys); kfree(aac->queues); - free_irq(pdev->irq, aac); aac_adapter_ioremap(aac, 0); kfree(aac->fibs); -- cgit v1.2.3-18-g5258