summaryrefslogtreecommitdiff
path: root/drivers/scsi/qla2xxx/qla_init.c
diff options
context:
space:
mode:
authorMadhuranath Iyengar <Madhu.Iyengar@qlogic.com>2010-10-15 11:27:46 -0700
committerJames Bottomley <James.Bottomley@suse.de>2010-10-25 16:03:18 -0500
commite30d1756480dc5d139458b140b69873cdb10119f (patch)
treea3177311cd8c687c781e70f9b19774c79954bdd1 /drivers/scsi/qla2xxx/qla_init.c
parent339aa70ecb3d0ef733f4d0393e2b5f6aea617839 (diff)
[SCSI] qla2xxx: Addition of shutdown callback handler.
This patch adds a shutdown handler to qla2xxx driver to make sure that all DMA and firmware activities are stopped, and any associated driver resources are released. The need for this handler arose when executing kexec in specific environments caused the data of the 2nd kernel to be corrupted, due to DMA activities. Signed-off-by: Madhuranath Iyengar <Madhu.Iyengar@qlogic.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_init.c')
-rw-r--r--drivers/scsi/qla2xxx/qla_init.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c
index 77c68a78968..a7ad22bf77e 100644
--- a/drivers/scsi/qla2xxx/qla_init.c
+++ b/drivers/scsi/qla2xxx/qla_init.c
@@ -1344,6 +1344,13 @@ cont_alloc:
qla_printk(KERN_WARNING, ha, "Unable to allocate (%d KB) for "
"firmware dump!!!\n", dump_size / 1024);
+ if (ha->fce) {
+ dma_free_coherent(&ha->pdev->dev, FCE_SIZE, ha->fce,
+ ha->fce_dma);
+ ha->fce = NULL;
+ ha->fce_dma = 0;
+ }
+
if (ha->eft) {
dma_free_coherent(&ha->pdev->dev, eft_size, ha->eft,
ha->eft_dma);