aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_mbox.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2008-12-04 22:39:35 -0500
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-12-29 12:24:27 -0500
commit5b75da2fa2c9570c3c3dbb2f63cae5b4183e0ca3 (patch)
tree618f67c4fd9cda1d60aa24d04262e4fb3ee2911f /drivers/scsi/lpfc/lpfc_mbox.c
parenteaf15d5b5605e1a403f631489de30a49fd66905d (diff)
[SCSI] lpfc 8.3.0 : Add active interrupt test for enabling MSI/MSI-X/INTx
Per the recent discussions at the Linux Plumbers Conference, when enabling MSI or MSI-X, generate a test interrupt to verify the interrupt routing is working properly. If the test interrupt fails, fall back to MSI first, and if that fails as well, to INTx. If the interrupt test fails with INTx, log an error and fail the PCI probe. Also changed the use of spin_(lock|unlock) to the _irq(save|restore) variants in the interrupt handlers because with multi-message MSI-X, both interrupt handlers can now run in parallel. Signed-off-by: James Smart <James.Smart@emulex.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_mbox.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_mbox.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/scsi/lpfc/lpfc_mbox.c b/drivers/scsi/lpfc/lpfc_mbox.c
index 5bb376baba62..7c02a6c3b699 100644
--- a/drivers/scsi/lpfc/lpfc_mbox.c
+++ b/drivers/scsi/lpfc/lpfc_mbox.c
@@ -1315,10 +1315,12 @@ lpfc_mbox_get(struct lpfc_hba * phba)
1315void 1315void
1316lpfc_mbox_cmpl_put(struct lpfc_hba * phba, LPFC_MBOXQ_t * mbq) 1316lpfc_mbox_cmpl_put(struct lpfc_hba * phba, LPFC_MBOXQ_t * mbq)
1317{ 1317{
1318 unsigned long iflag;
1319
1318 /* This function expects to be called from interrupt context */ 1320 /* This function expects to be called from interrupt context */
1319 spin_lock(&phba->hbalock); 1321 spin_lock_irqsave(&phba->hbalock, iflag);
1320 list_add_tail(&mbq->list, &phba->sli.mboxq_cmpl); 1322 list_add_tail(&mbq->list, &phba->sli.mboxq_cmpl);
1321 spin_unlock(&phba->hbalock); 1323 spin_unlock_irqrestore(&phba->hbalock, iflag);
1322 return; 1324 return;
1323} 1325}
1324 1326