aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_isr.c
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2012-11-23 06:58:38 -0500
committerJames Bottomley <JBottomley@Parallels.com>2013-01-28 21:55:06 -0500
commit5c19b92ae82a2b39add78b2d2bc1c4e4d7c4d2ec (patch)
tree6c90d253925988191a522e0f718a871110fe646a /drivers/scsi/qla4xxx/ql4_isr.c
parent8108de9739abeec72f4811532109695e245df42a (diff)
[SCSI] qla4xxx: Fix MBOX intr switching from polling to intr mode for ISP83XX
Issue: Mailbox command timed out after switching from polling mode to interrupt mode. Events:- 1. Mailbox interrupts are disabled 2. FW generates AEN and at same time driver enables Mailbox Interrupt 3. Driver issues new mailbox to Firmware In above case driver will not get AEN interrupts generated by FW in step #2 as FW generated this AEN when interrupts are disabled. During the same time driver enabled the mailbox interrupt, so driver will not poll for interrupt. Driver will never process AENs generated in step #2 and issues new mailbox to FW, but now FW is not able to post mailbox completion as AENs generated before are not processed by driver. Fix: Enable Mailbox / AEN interrupts before initializing FW in case of ISP83XX. This will make sure we process all Mailbox and AENs in interrupt mode. Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_isr.c')
-rw-r--r--drivers/scsi/qla4xxx/ql4_isr.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_isr.c b/drivers/scsi/qla4xxx/ql4_isr.c
index 15ea81465ce4..acbc2feaa005 100644
--- a/drivers/scsi/qla4xxx/ql4_isr.c
+++ b/drivers/scsi/qla4xxx/ql4_isr.c
@@ -1437,11 +1437,14 @@ irq_not_attached:
1437 1437
1438void qla4xxx_free_irqs(struct scsi_qla_host *ha) 1438void qla4xxx_free_irqs(struct scsi_qla_host *ha)
1439{ 1439{
1440 if (test_bit(AF_MSIX_ENABLED, &ha->flags)) 1440 if (test_and_clear_bit(AF_IRQ_ATTACHED, &ha->flags)) {
1441 qla4_8xxx_disable_msix(ha); 1441 if (test_bit(AF_MSIX_ENABLED, &ha->flags)) {
1442 else if (test_and_clear_bit(AF_MSI_ENABLED, &ha->flags)) { 1442 qla4_8xxx_disable_msix(ha);
1443 free_irq(ha->pdev->irq, ha); 1443 } else if (test_and_clear_bit(AF_MSI_ENABLED, &ha->flags)) {
1444 pci_disable_msi(ha->pdev); 1444 free_irq(ha->pdev->irq, ha);
1445 } else if (test_and_clear_bit(AF_INTx_ENABLED, &ha->flags)) 1445 pci_disable_msi(ha->pdev);
1446 free_irq(ha->pdev->irq, ha); 1446 } else if (test_and_clear_bit(AF_INTx_ENABLED, &ha->flags)) {
1447 free_irq(ha->pdev->irq, ha);
1448 }
1449 }
1447} 1450}