[SCSI] qla4xxx: Clear the RISC interrupt bit during FW init
authorSarang Radke <sarang.radke@qlogic.com>
Wed, 11 Jan 2012 10:44:18 +0000 (02:44 -0800)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 16 Jan 2012 08:33:24 +0000 (12:33 +0400)
This patch fix kernel panic during kdump.

Signed-off-by: Sarang Radke <sarang.radke@qlogic.com>
Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
Reviewed-by: Mike Christie <michaelc@cs.wisc.edu>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/qla4xxx/ql4_init.c
drivers/scsi/qla4xxx/ql4_nx.c

index 1bdfa8120ac888c65c304c28dc3f3aba806ea403..90614f38b55d54541bba90d114d37e1ae4c553d7 100644 (file)
@@ -697,6 +697,9 @@ int qla4xxx_start_firmware(struct scsi_qla_host *ha)
                        writel(set_rmask(CSR_SCSI_PROCESSOR_INTR),
                               &ha->reg->ctrl_status);
                        readl(&ha->reg->ctrl_status);
+                       writel(set_rmask(CSR_SCSI_COMPLETION_INTR),
+                              &ha->reg->ctrl_status);
+                       readl(&ha->reg->ctrl_status);
                        spin_unlock_irqrestore(&ha->hardware_lock, flags);
                        if (qla4xxx_get_firmware_state(ha) == QLA_SUCCESS) {
                                DEBUG2(printk("scsi%ld: %s: Get firmware "
index 8d6bc1b2ff17266a45d66dfb923f5c7757cf1493..78f1111158d75379d4d1c1ef04a139889c280d3d 100644 (file)
@@ -1875,6 +1875,11 @@ exit:
 int qla4_8xxx_load_risc(struct scsi_qla_host *ha)
 {
        int retval;
+
+       /* clear the interrupt */
+       writel(0, &ha->qla4_8xxx_reg->host_int);
+       readl(&ha->qla4_8xxx_reg->host_int);
+
        retval = qla4_8xxx_device_state_handler(ha);
 
        if (retval == QLA_SUCCESS && !test_bit(AF_INIT_DONE, &ha->flags))