Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d88021a6710e6ed5d1899ba2e54d4638026e277d
Commit:     d88021a6710e6ed5d1899ba2e54d4638026e277d
Parent:     a8488abefaa863a0c3a19888f03395adb3f1c6d2
Author:     Andrew Vasquez <[EMAIL PROTECTED]>
AuthorDate: Mon Jan 29 10:22:20 2007 -0800
Committer:  James Bottomley <[EMAIL PROTECTED]>
CommitDate: Wed Jan 31 11:06:12 2007 -0600

    [SCSI] qla2xxx: Handle IRQ-0 assignments by the system.
    
    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 <[EMAIL PROTECTED]>
    Signed-off-by: James Bottomley <[EMAIL PROTECTED]>
---
 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 8d7e8cb..3b26f8e 100644
--- a/drivers/scsi/qla2xxx/qla_def.h
+++ b/drivers/scsi/qla2xxx/qla_def.h
@@ -2097,6 +2097,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 e883b5f..6e19769 100644
--- a/drivers/scsi/qla2xxx/qla_isr.c
+++ b/drivers/scsi/qla2xxx/qla_isr.c
@@ -1725,12 +1725,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;
 }
@@ -1741,6 +1743,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);
 }
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to