diff options
author | Andrew Vasquez <andrew.vasquez@qlogic.com> | 2007-01-29 13:22:20 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.il.steeleye.com> | 2007-01-31 12:06:12 -0500 |
commit | d88021a6710e6ed5d1899ba2e54d4638026e277d (patch) | |
tree | 4c251c19a0b98b616754046b9eaafa8176de1a25 /drivers/scsi/qla2xxx/qla_isr.c | |
parent | a8488abefaa863a0c3a19888f03395adb3f1c6d2 (diff) |
[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 <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/qla2xxx/qla_isr.c')
-rw-r--r-- | drivers/scsi/qla2xxx/qla_isr.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index e883b5fc3b08..6e19769b46d2 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) | |||
1725 | skip_msix: | 1725 | skip_msix: |
1726 | ret = request_irq(ha->pdev->irq, ha->isp_ops.intr_handler, | 1726 | ret = request_irq(ha->pdev->irq, ha->isp_ops.intr_handler, |
1727 | IRQF_DISABLED|IRQF_SHARED, QLA2XXX_DRIVER_NAME, ha); | 1727 | IRQF_DISABLED|IRQF_SHARED, QLA2XXX_DRIVER_NAME, ha); |
1728 | if (ret) { | 1728 | if (!ret) { |
1729 | ha->flags.inta_enabled = 1; | ||
1730 | ha->host->irq = ha->pdev->irq; | ||
1731 | } else { | ||
1729 | qla_printk(KERN_WARNING, ha, | 1732 | qla_printk(KERN_WARNING, ha, |
1730 | "Failed to reserve interrupt %d already in use.\n", | 1733 | "Failed to reserve interrupt %d already in use.\n", |
1731 | ha->pdev->irq); | 1734 | ha->pdev->irq); |
1732 | } | 1735 | } |
1733 | ha->host->irq = ha->pdev->irq; | ||
1734 | 1736 | ||
1735 | return ret; | 1737 | return ret; |
1736 | } | 1738 | } |
@@ -1741,6 +1743,6 @@ qla2x00_free_irqs(scsi_qla_host_t *ha) | |||
1741 | 1743 | ||
1742 | if (ha->flags.msix_enabled) | 1744 | if (ha->flags.msix_enabled) |
1743 | qla24xx_disable_msix(ha); | 1745 | qla24xx_disable_msix(ha); |
1744 | else if (ha->host->irq) | 1746 | else if (ha->flags.inta_enabled) |
1745 | free_irq(ha->host->irq, ha); | 1747 | free_irq(ha->host->irq, ha); |
1746 | } | 1748 | } |