Skip to content

Commit

Permalink
[SCSI] lpfc 8.3.32: Fix CQ and EQ dump failure for debugfs
Browse files Browse the repository at this point in the history
Fixed debug helper routine failed to dump CQ and EQ entries in non-MSI-X mode

Signed-off-by: Alex Iannicelli <alex.iannicelli@emulex.com>
Signed-off-by: James Smart <james.smart@emulex.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
  • Loading branch information
James Smart authored and James Bottomley committed Jul 20, 2012
1 parent a629852 commit 3b3da6a
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions drivers/scsi/lpfc/lpfc_debugfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -395,8 +395,13 @@ lpfc_debug_dump_fcp_cq(struct lpfc_hba *phba, int fcp_wqidx)
for (fcp_cqidx = 0; fcp_cqidx < phba->cfg_fcp_eq_count; fcp_cqidx++)
if (phba->sli4_hba.fcp_cq[fcp_cqidx]->queue_id == fcp_cqid)
break;
if (fcp_cqidx >= phba->cfg_fcp_eq_count)
return;
if (phba->intr_type == MSIX) {
if (fcp_cqidx >= phba->cfg_fcp_eq_count)
return;
} else {
if (fcp_cqidx > 0)
return;
}

printk(KERN_ERR "FCP CQ: WQ[Idx:%d|Qid%d]->CQ[Idx%d|Qid%d]:\n",
fcp_wqidx, phba->sli4_hba.fcp_wq[fcp_wqidx]->queue_id,
Expand Down Expand Up @@ -426,8 +431,13 @@ lpfc_debug_dump_fcp_eq(struct lpfc_hba *phba, int fcp_wqidx)
for (fcp_cqidx = 0; fcp_cqidx < phba->cfg_fcp_eq_count; fcp_cqidx++)
if (phba->sli4_hba.fcp_cq[fcp_cqidx]->queue_id == fcp_cqid)
break;
if (fcp_cqidx >= phba->cfg_fcp_eq_count)
return;
if (phba->intr_type == MSIX) {
if (fcp_cqidx >= phba->cfg_fcp_eq_count)
return;
} else {
if (fcp_cqidx > 0)
return;
}

if (phba->cfg_fcp_eq_count == 0) {
fcp_eqidx = -1;
Expand Down

0 comments on commit 3b3da6a

Please sign in to comment.