summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_os.c
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2012-08-22 13:45:25 +0200
committerJames Bottomley <JBottomley@Parallels.com>2012-09-24 10:11:04 +0200
commitd9e62e513081c66d85bb0b91740ce3313c56b546 (patch)
treedb16bfaabae13660d03f5eaf7d8adff4469cb078 /drivers/scsi/qla4xxx/ql4_os.c
parent[SCSI] qla4xxx: Fix lockdep warning in qla4xxx_post_work() (diff)
downloadlinux-d9e62e513081c66d85bb0b91740ce3313c56b546.tar.xz
linux-d9e62e513081c66d85bb0b91740ce3313c56b546.zip
[SCSI] qla4xxx: Clear interrupt while unloading driver.
while processing the stop firmware mailbox command on driver unload, a interrupt is processed which causes kernel panic as the response queue is not valid. Fix is to clear the interrupt in free_adapter call just after disabling the interrupts. 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>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_os.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_os.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index fa1a3594edd5..f06b7c5b6b9a 100644
--- a/drivers/scsi/qla4xxx/ql4_os.c
+++ b/drivers/scsi/qla4xxx/ql4_os.c
@@ -3487,6 +3487,15 @@ static void qla4xxx_free_adapter(struct scsi_qla_host *ha)
ha->isp_ops->disable_intrs(ha);
}
+ if (is_qla40XX(ha)) {
+ writel(set_rmask(CSR_SCSI_PROCESSOR_INTR),
+ &ha->reg->ctrl_status);
+ readl(&ha->reg->ctrl_status);
+ } else if (is_qla8022(ha)) {
+ writel(0, &ha->qla4_8xxx_reg->host_int);
+ readl(&ha->qla4_8xxx_reg->host_int);
+ }
+
/* Remove timer thread, if present */
if (ha->timer_active)
qla4xxx_stop_timer(ha);