From: Andrew Vasquez <andrew.vasquez@qlogic.com>
To: Linux SCSI Mailing List <linux-scsi@vger.kernel.org>,
James Bottomley <james.bottomley@steeleye.com>
Cc: Andrew Vasquez <andrew.vasquez@qlogic.com>
Subject: [PATCH 3/14] qla2xxx: Handle IRQ-0 assignments by the system.
Date: Mon, 29 Jan 2007 10:22:20 -0800 [thread overview]
Message-ID: <11700949513719-git-send-email-andrew.vasquez@qlogic.com> (raw)
In-Reply-To: <20070129182124.GA26940@andrew-vasquezs-computer.local>
No restriction should be placed on the IRQ number assigned
to a given ISP. Original code incorrectly assumed a
non-zero IRQ number assignment by the system. In these
circumstances the proper freeing of the IRQ (via free_irq())
would not take place.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
---
drivers/scsi/qla2xxx/qla_def.h | 1 +
drivers/scsi/qla2xxx/qla_isr.c | 8 +++++---
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h
index 9b7bcc0..53dd546 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2098,6 +2098,7 @@ typedef struct scsi_qla_host {
uint32_t enable_lip_full_login :1;
uint32_t enable_target_reset :1;
uint32_t enable_led_scheme :1;
+ uint32_t inta_enabled :1;
uint32_t msi_enabled :1;
uint32_t msix_enabled :1;
uint32_t disable_serdes :1;
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c
index d6f396d..fe8a264 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -1728,12 +1728,14 @@ qla2x00_request_irqs(scsi_qla_host_t *ha)
skip_msix:
ret = request_irq(ha->pdev->irq, ha->isp_ops.intr_handler,
IRQF_DISABLED|IRQF_SHARED, QLA2XXX_DRIVER_NAME, ha);
- if (ret) {
+ if (!ret) {
+ ha->flags.inta_enabled = 1;
+ ha->host->irq = ha->pdev->irq;
+ } else {
qla_printk(KERN_WARNING, ha,
"Failed to reserve interrupt %d already in use.\n",
ha->pdev->irq);
}
- ha->host->irq = ha->pdev->irq;
return ret;
}
@@ -1744,6 +1746,6 @@ qla2x00_free_irqs(scsi_qla_host_t *ha)
if (ha->flags.msix_enabled)
qla24xx_disable_msix(ha);
- else if (ha->host->irq)
+ else if (ha->flags.inta_enabled)
free_irq(ha->host->irq, ha);
}
--
1.5.0.rc2.gdbaa0
next prev parent reply other threads:[~2007-01-29 18:22 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-29 18:21 [PATCH 0/14] qla2xxx: driver update Andrew Vasquez
2007-01-29 18:22 ` [PATCH 1/14] qla2xxx: Correct sector-erase issues while writing flash Andrew Vasquez
2007-01-29 18:22 ` [PATCH 2/14] qla2xxx: Add MSI-X support Andrew Vasquez
2007-01-29 18:22 ` Andrew Vasquez [this message]
2007-01-29 18:22 ` [PATCH 4/14] qla2xxx: Export OptionROM boot-codes version information Andrew Vasquez
2007-01-29 18:22 ` [PATCH 5/14] qla2xxx: Perform implicit LOGO during fabric logout request Andrew Vasquez
2007-01-29 18:22 ` [PATCH 6/14] qla2xxx: Set correct cabling state during initialization Andrew Vasquez
2007-01-29 18:22 ` [PATCH 7/14] qla2xxx: Refactor set-HBA-model/description code Andrew Vasquez
2007-01-29 18:22 ` [PATCH 8/14] qla2xxx: Check loop-state before reading host statistics Andrew Vasquez
2007-01-29 18:22 ` [PATCH 9/14] qla2xxx: Fail initialization when inconsistent NVRAM detected Andrew Vasquez
2007-01-29 18:22 ` [PATCH 10/14] qla2xxx: Enable queue-full throttling when UNDERRUN detected Andrew Vasquez
2007-01-29 18:22 ` [PATCH 11/14] qla2xxx: Allow NVRAM updates to immediately go into affect Andrew Vasquez
2007-01-29 18:22 ` [PATCH 12/14] qla2xxx: Fixup printk() with proper new-line character Andrew Vasquez
2007-01-29 18:22 ` [PATCH 13/14] qla2xxx: Remove unnecessary spinlock primitive - mbx_reg_lock Andrew Vasquez
2007-01-29 18:22 ` [PATCH 14/14] qla2xxx: Update version number to 8.01.07-k5 Andrew Vasquez
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=11700949513719-git-send-email-andrew.vasquez@qlogic.com \
--to=andrew.vasquez@qlogic.com \
--cc=james.bottomley@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
/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