|
@@ -293,7 +293,9 @@ lpfc_sli4_eq_release(struct lpfc_queue *q, bool arm)
|
|
|
}
|
|
|
bf_set(lpfc_eqcq_doorbell_num_released, &doorbell, released);
|
|
|
bf_set(lpfc_eqcq_doorbell_qt, &doorbell, LPFC_QUEUE_TYPE_EVENT);
|
|
|
- bf_set(lpfc_eqcq_doorbell_eqid, &doorbell, q->queue_id);
|
|
|
+ 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);
|
|
|
/* PCI read to flush PCI pipeline on re-arming for INTx mode */
|
|
|
if ((q->phba->intr_type == INTx) && (arm == LPFC_QUEUE_REARM))
|
|
@@ -372,7 +374,9 @@ lpfc_sli4_cq_release(struct lpfc_queue *q, bool arm)
|
|
|
bf_set(lpfc_eqcq_doorbell_arm, &doorbell, 1);
|
|
|
bf_set(lpfc_eqcq_doorbell_num_released, &doorbell, released);
|
|
|
bf_set(lpfc_eqcq_doorbell_qt, &doorbell, LPFC_QUEUE_TYPE_COMPLETION);
|
|
|
- bf_set(lpfc_eqcq_doorbell_cqid, &doorbell, q->queue_id);
|
|
|
+ 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);
|
|
|
return released;
|
|
|
}
|
|
@@ -5596,6 +5600,8 @@ lpfc_sli4_alloc_resource_identifiers(struct lpfc_hba *phba)
|
|
|
for (i = 0; i < count; i++)
|
|
|
phba->sli4_hba.rpi_ids[i] = base + i;
|
|
|
|
|
|
+ lpfc_sli4_node_prep(phba);
|
|
|
+
|
|
|
/* VPIs. */
|
|
|
count = phba->sli4_hba.max_cfg_param.max_vpi;
|
|
|
base = phba->sli4_hba.max_cfg_param.vpi_base;
|
|
@@ -7555,6 +7561,8 @@ lpfc_sli4_bpl2sgl(struct lpfc_hba *phba, struct lpfc_iocbq *piocbq,
|
|
|
|
|
|
sgl = (struct sli4_sge *)sglq->sgl;
|
|
|
icmd = &piocbq->iocb;
|
|
|
+ if (icmd->ulpCommand == CMD_XMIT_BLS_RSP64_CX)
|
|
|
+ return sglq->sli4_xritag;
|
|
|
if (icmd->un.genreq64.bdl.bdeFlags == BUFF_TYPE_BLP_64) {
|
|
|
numBdes = icmd->un.genreq64.bdl.bdeSize /
|
|
|
sizeof(struct ulp_bde64);
|
|
@@ -7756,6 +7764,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
|
|
|
if (if_type == LPFC_SLI_INTF_IF_TYPE_2) {
|
|
|
if (pcmd && (*pcmd == ELS_CMD_FLOGI ||
|
|
|
*pcmd == ELS_CMD_SCR ||
|
|
|
+ *pcmd == ELS_CMD_FDISC ||
|
|
|
*pcmd == ELS_CMD_PLOGI)) {
|
|
|
bf_set(els_req64_sp, &wqe->els_req, 1);
|
|
|
bf_set(els_req64_sid, &wqe->els_req,
|
|
@@ -7982,6 +7991,7 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
|
|
|
xritag = 0;
|
|
|
break;
|
|
|
case CMD_XMIT_BLS_RSP64_CX:
|
|
|
+ ndlp = (struct lpfc_nodelist *)iocbq->context1;
|
|
|
/* As BLS ABTS RSP WQE is very different from other WQEs,
|
|
|
* we re-construct this WQE here based on information in
|
|
|
* iocbq from scratch.
|
|
@@ -8008,8 +8018,15 @@ lpfc_sli4_iocb2wqe(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq,
|
|
|
}
|
|
|
bf_set(xmit_bls_rsp64_seqcnthi, &wqe->xmit_bls_rsp, 0xffff);
|
|
|
bf_set(wqe_xmit_bls_pt, &wqe->xmit_bls_rsp.wqe_dest, 0x1);
|
|
|
+
|
|
|
+ /* Use CT=VPI */
|
|
|
+ bf_set(wqe_els_did, &wqe->xmit_bls_rsp.wqe_dest,
|
|
|
+ ndlp->nlp_DID);
|
|
|
+ bf_set(xmit_bls_rsp64_temprpi, &wqe->xmit_bls_rsp,
|
|
|
+ iocbq->iocb.ulpContext);
|
|
|
+ bf_set(wqe_ct, &wqe->xmit_bls_rsp.wqe_com, 1);
|
|
|
bf_set(wqe_ctxt_tag, &wqe->xmit_bls_rsp.wqe_com,
|
|
|
- iocbq->iocb.ulpContext);
|
|
|
+ phba->vpi_ids[phba->pport->vpi]);
|
|
|
bf_set(wqe_qosd, &wqe->xmit_bls_rsp.wqe_com, 1);
|
|
|
bf_set(wqe_lenloc, &wqe->xmit_bls_rsp.wqe_com,
|
|
|
LPFC_WQE_LENLOC_NONE);
|
|
@@ -8073,8 +8090,7 @@ __lpfc_sli_issue_iocb_s4(struct lpfc_hba *phba, uint32_t ring_number,
|
|
|
|
|
|
if (piocb->sli4_xritag == NO_XRI) {
|
|
|
if (piocb->iocb.ulpCommand == CMD_ABORT_XRI_CN ||
|
|
|
- piocb->iocb.ulpCommand == CMD_CLOSE_XRI_CN ||
|
|
|
- piocb->iocb.ulpCommand == CMD_XMIT_BLS_RSP64_CX)
|
|
|
+ piocb->iocb.ulpCommand == CMD_CLOSE_XRI_CN)
|
|
|
sglq = NULL;
|
|
|
else {
|
|
|
if (pring->txq_cnt) {
|
|
@@ -8384,10 +8400,13 @@ lpfc_sli4_abts_err_handler(struct lpfc_hba *phba,
|
|
|
{
|
|
|
struct lpfc_vport *vport;
|
|
|
|
|
|
- if (!ndlp || !NLP_CHK_NODE_ACT(ndlp))
|
|
|
+ if (!ndlp || !NLP_CHK_NODE_ACT(ndlp)) {
|
|
|
lpfc_printf_log(phba, KERN_INFO, LOG_SLI,
|
|
|
"3115 Node Context not found, driver "
|
|
|
"ignoring abts err event\n");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
vport = ndlp->vport;
|
|
|
lpfc_printf_log(phba, KERN_WARNING, LOG_SLI,
|
|
|
"3116 Port generated FCP XRI ABORT event on "
|
|
@@ -14042,6 +14061,13 @@ lpfc_sli4_seq_abort_rsp_cmpl(struct lpfc_hba *phba,
|
|
|
{
|
|
|
if (cmd_iocbq)
|
|
|
lpfc_sli_release_iocbq(phba, cmd_iocbq);
|
|
|
+
|
|
|
+ /* Failure means BLS ABORT RSP did not get delivered to remote node*/
|
|
|
+ if (rsp_iocbq && rsp_iocbq->iocb.ulpStatus)
|
|
|
+ lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
|
|
|
+ "3154 BLS ABORT RSP failed, data: x%x/x%x\n",
|
|
|
+ rsp_iocbq->iocb.ulpStatus,
|
|
|
+ rsp_iocbq->iocb.un.ulpWord[4]);
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -14748,7 +14774,8 @@ lpfc_sli4_remove_rpis(struct lpfc_hba *phba)
|
|
|
* provided rpi via a bitmask.
|
|
|
**/
|
|
|
int
|
|
|
-lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp)
|
|
|
+lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp,
|
|
|
+ void (*cmpl)(struct lpfc_hba *, LPFC_MBOXQ_t *), void *arg)
|
|
|
{
|
|
|
LPFC_MBOXQ_t *mboxq;
|
|
|
struct lpfc_hba *phba = ndlp->phba;
|
|
@@ -14761,6 +14788,12 @@ lpfc_sli4_resume_rpi(struct lpfc_nodelist *ndlp)
|
|
|
|
|
|
/* Post all rpi memory regions to the port. */
|
|
|
lpfc_resume_rpi(mboxq, ndlp);
|
|
|
+ if (cmpl) {
|
|
|
+ mboxq->mbox_cmpl = cmpl;
|
|
|
+ mboxq->context1 = arg;
|
|
|
+ mboxq->context2 = ndlp;
|
|
|
+ }
|
|
|
+ mboxq->vport = ndlp->vport;
|
|
|
rc = lpfc_sli_issue_mbox(phba, mboxq, MBX_NOWAIT);
|
|
|
if (rc == MBX_NOT_FINISHED) {
|
|
|
lpfc_printf_log(phba, KERN_ERR, LOG_SLI,
|