scsi: lpfc: Rework sli4 doorbell infrastructure
Up until now, all SLI-4 devices had the same doorbells at the same bar locations. With newer hardware, there are now independent EQ and CQ doorbells and the bar locations differ. Prepare the code for new hardware by separating the eq/cq doorbell into separate components. The components can be set based on if_type. Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com> Signed-off-by: James Smart <james.smart@broadcom.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:

committed by
Martin K. Petersen

parent
b71413dd01
commit
9dd35425a5
@@ -310,7 +310,7 @@ lpfc_sli4_eq_clr_intr(struct lpfc_queue *q)
|
||||
bf_set(lpfc_eqcq_doorbell_eqid_hi, &doorbell,
|
||||
(q->queue_id >> LPFC_EQID_HI_FIELD_SHIFT));
|
||||
bf_set(lpfc_eqcq_doorbell_eqid_lo, &doorbell, q->queue_id);
|
||||
writel(doorbell.word0, q->phba->sli4_hba.EQCQDBregaddr);
|
||||
writel(doorbell.word0, q->phba->sli4_hba.EQDBregaddr);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -360,10 +360,10 @@ lpfc_sli4_eq_release(struct lpfc_queue *q, bool arm)
|
||||
bf_set(lpfc_eqcq_doorbell_eqid_hi, &doorbell,
|
||||
(q->queue_id >> LPFC_EQID_HI_FIELD_SHIFT));
|
||||
bf_set(lpfc_eqcq_doorbell_eqid_lo, &doorbell, q->queue_id);
|
||||
writel(doorbell.word0, q->phba->sli4_hba.EQCQDBregaddr);
|
||||
writel(doorbell.word0, q->phba->sli4_hba.EQDBregaddr);
|
||||
/* PCI read to flush PCI pipeline on re-arming for INTx mode */
|
||||
if ((q->phba->intr_type == INTx) && (arm == LPFC_QUEUE_REARM))
|
||||
readl(q->phba->sli4_hba.EQCQDBregaddr);
|
||||
readl(q->phba->sli4_hba.EQDBregaddr);
|
||||
return released;
|
||||
}
|
||||
|
||||
@@ -453,7 +453,7 @@ lpfc_sli4_cq_release(struct lpfc_queue *q, bool arm)
|
||||
bf_set(lpfc_eqcq_doorbell_cqid_hi, &doorbell,
|
||||
(q->queue_id >> LPFC_CQID_HI_FIELD_SHIFT));
|
||||
bf_set(lpfc_eqcq_doorbell_cqid_lo, &doorbell, q->queue_id);
|
||||
writel(doorbell.word0, q->phba->sli4_hba.EQCQDBregaddr);
|
||||
writel(doorbell.word0, q->phba->sli4_hba.CQDBregaddr);
|
||||
return released;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user