]> Pileus Git - ~andy/linux/commitdiff
[SCSI] qla2xxx: Handle IRQ-0 assignments by the system.
authorAndrew Vasquez <andrew.vasquez@qlogic.com>
Mon, 29 Jan 2007 18:22:20 +0000 (10:22 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Wed, 31 Jan 2007 17:06:12 +0000 (11:06 -0600)
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>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/qla2xxx/qla_def.h
drivers/scsi/qla2xxx/qla_isr.c

index 8d7e8cb1e703822552d86818eab6a2b69a721300..3b26f8e00ace4ddee7996c25cb5f01397b4b8660 100644 (file)
@@ -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;
index e883b5fc3b08677184cff7f1d2717d3bd22e5c24..6e19769b46d259e93e57d859a880b0ad2b9a1dfe 100644 (file)
@@ -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);
 }