aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_debugfs.c
diff options
context:
space:
mode:
authorJames Smart <James.Smart@Emulex.Com>2009-05-22 14:50:54 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2009-06-08 12:18:10 -0400
commit3772a99175f5378b5001e8da364341a8b8226a4a (patch)
treedd710f890c5bc097c874ad1783cd26ea56e88f57 /drivers/scsi/lpfc/lpfc_debugfs.c
parenta366695592ebc9151dd5a248681270f0925d8324 (diff)
[SCSI] lpfc 8.3.2 : Reorganization for SLI4
Preps the organization of the driver so that the bottom half, which interacts with the hardware, can share common code sequences for attachment, detachment, initialization, teardown, etc with new hardware. For very common code sections, which become specific to the interface type, the driver uses an indirect function call. The function is set at initialization. For less common sections, such as initialization, the driver looks at the interface type and calls the routines relative to the interface. 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_debugfs.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_debugfs.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_debugfs.c b/drivers/scsi/lpfc/lpfc_debugfs.c
index 52be5644e07a..5dd66925f4ca 100644
--- a/drivers/scsi/lpfc/lpfc_debugfs.c
+++ b/drivers/scsi/lpfc/lpfc_debugfs.c
@@ -280,6 +280,8 @@ lpfc_debugfs_hbqinfo_data(struct lpfc_hba *phba, char *buf, int size)
280 struct lpfc_dmabuf *d_buf; 280 struct lpfc_dmabuf *d_buf;
281 struct hbq_dmabuf *hbq_buf; 281 struct hbq_dmabuf *hbq_buf;
282 282
283 if (phba->sli_rev != 3)
284 return 0;
283 cnt = LPFC_HBQINFO_SIZE; 285 cnt = LPFC_HBQINFO_SIZE;
284 spin_lock_irq(&phba->hbalock); 286 spin_lock_irq(&phba->hbalock);
285 287
@@ -489,12 +491,15 @@ lpfc_debugfs_dumpHostSlim_data(struct lpfc_hba *phba, char *buf, int size)
489 pring->next_cmdidx, pring->local_getidx, 491 pring->next_cmdidx, pring->local_getidx,
490 pring->flag, pgpp->rspPutInx, pring->numRiocb); 492 pring->flag, pgpp->rspPutInx, pring->numRiocb);
491 } 493 }
492 word0 = readl(phba->HAregaddr); 494
493 word1 = readl(phba->CAregaddr); 495 if (phba->sli_rev <= LPFC_SLI_REV3) {
494 word2 = readl(phba->HSregaddr); 496 word0 = readl(phba->HAregaddr);
495 word3 = readl(phba->HCregaddr); 497 word1 = readl(phba->CAregaddr);
496 len += snprintf(buf+len, size-len, "HA:%08x CA:%08x HS:%08x HC:%08x\n", 498 word2 = readl(phba->HSregaddr);
497 word0, word1, word2, word3); 499 word3 = readl(phba->HCregaddr);
500 len += snprintf(buf+len, size-len, "HA:%08x CA:%08x HS:%08x "
501 "HC:%08x\n", word0, word1, word2, word3);
502 }
498 spin_unlock_irq(&phba->hbalock); 503 spin_unlock_irq(&phba->hbalock);
499 return len; 504 return len;
500} 505}