Skip to content

Commit

Permalink
[SCSI] aacraid: fix shutdown handler to also disable interrupts.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Salyzyn, Mark authored and James Bottomley committed Jun 1, 2007
1 parent 88f5774 commit 94774a3
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions drivers/scsi/aacraid/linit.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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);
Expand All @@ -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)
Expand All @@ -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);
Expand Down

0 comments on commit 94774a3

Please sign in to comment.