From: vikas.chaudhary@qlogic.com
To: jbottomley@parallels.com, michaelc@cs.wisc.edu
Cc: linux-scsi@vger.kernel.org, vikas.chaudhary@qlogic.com,
lalit.chandivade@qlogic.com, ravi.anand@qlogic.com
Subject: [PATCH 2/4] qla4xxx: Clear interrupt while unloading driver.
Date: Wed, 22 Aug 2012 07:45:25 -0400 [thread overview]
Message-ID: <1345635927-22420-3-git-send-email-vikas.chaudhary@qlogic.com> (raw)
In-Reply-To: <1345635927-22420-1-git-send-email-vikas.chaudhary@qlogic.com>
From: Vikas Chaudhary <vikas.chaudhary@qlogic.com>
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>
---
drivers/scsi/qla4xxx/ql4_os.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/drivers/scsi/qla4xxx/ql4_os.c b/drivers/scsi/qla4xxx/ql4_os.c
index fa1a359..f06b7c5 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);
--
1.7.8.GIT
next prev parent reply other threads:[~2012-08-22 12:02 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-22 11:45 [PATCH 0/4] qla4xxx: Updates for scsi "misc" branch vikas.chaudhary
2012-08-22 11:45 ` [PATCH 1/4] qla4xxx: Fix lockdep warning in qla4xxx_post_work() vikas.chaudhary
2012-08-22 11:45 ` vikas.chaudhary [this message]
2012-08-22 11:45 ` [PATCH 3/4] qla4xxx: Wait for cmd to complete before chip reset for ISP40XX vikas.chaudhary
2012-08-22 11:45 ` [PATCH 4/4] qla4xxx: Update driver version to 5.02.00-k20 vikas.chaudhary
2012-09-06 5:36 ` [PATCH 0/4] qla4xxx: Updates for scsi "misc" branch Mike Christie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1345635927-22420-3-git-send-email-vikas.chaudhary@qlogic.com \
--to=vikas.chaudhary@qlogic.com \
--cc=jbottomley@parallels.com \
--cc=lalit.chandivade@qlogic.com \
--cc=linux-scsi@vger.kernel.org \
--cc=michaelc@cs.wisc.edu \
--cc=ravi.anand@qlogic.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).