Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit faa832e9 authored by James Smart's avatar James Smart Committed by Martin K. Petersen
Browse files

scsi: lpfc: Fix ELS abort on SLI-3 adapters



For ABORT_XRI_CN command, firmware identifies XRI to abort by IOTAG and RPI
combination. For ELS aborts, driver specifies IOTAG correctly but RPI is
not specified.

Fix by setting RPI in WQE.

Signed-off-by: default avatarDick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: default avatarJames Smart <james.smart@broadcom.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 25b88550
Loading
Loading
Loading
Loading
+3 −0
Original line number Original line Diff line number Diff line
@@ -1062,6 +1062,9 @@ lpfc_rcv_logo_plogi_issue(struct lpfc_vport *vport, struct lpfc_nodelist *ndlp,
{
{
	struct lpfc_iocbq *cmdiocb = (struct lpfc_iocbq *) arg;
	struct lpfc_iocbq *cmdiocb = (struct lpfc_iocbq *) arg;


	/* Retrieve RPI from LOGO IOCB. RPI is used for CMD_ABORT_XRI_CN */
	if (vport->phba->sli_rev == LPFC_SLI_REV3)
		ndlp->nlp_rpi = cmdiocb->iocb.ulpIoTag;
				/* software abort outstanding PLOGI */
				/* software abort outstanding PLOGI */
	lpfc_els_abort(vport->phba, ndlp);
	lpfc_els_abort(vport->phba, ndlp);


+14 −2
Original line number Original line Diff line number Diff line
@@ -10703,6 +10703,12 @@ lpfc_sli_abort_els_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
		spin_lock_irq(&phba->hbalock);
		spin_lock_irq(&phba->hbalock);
		if (phba->sli_rev < LPFC_SLI_REV4) {
		if (phba->sli_rev < LPFC_SLI_REV4) {
			if (irsp->ulpCommand == CMD_ABORT_XRI_CX &&
			    irsp->ulpStatus == IOSTAT_LOCAL_REJECT &&
			    irsp->un.ulpWord[4] == IOERR_ABORT_REQUESTED) {
				spin_unlock_irq(&phba->hbalock);
				goto release_iocb;
			}
			if (abort_iotag != 0 &&
			if (abort_iotag != 0 &&
				abort_iotag <= phba->sli.last_iotag)
				abort_iotag <= phba->sli.last_iotag)
				abort_iocb =
				abort_iocb =
@@ -10724,6 +10730,7 @@ lpfc_sli_abort_els_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
		spin_unlock_irq(&phba->hbalock);
		spin_unlock_irq(&phba->hbalock);
	}
	}
release_iocb:
	lpfc_sli_release_iocbq(phba, cmdiocb);
	lpfc_sli_release_iocbq(phba, cmdiocb);
	return;
	return;
}
}
@@ -10780,6 +10787,7 @@ lpfc_sli_abort_iotag_issue(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
	IOCB_t *iabt = NULL;
	IOCB_t *iabt = NULL;
	int retval;
	int retval;
	unsigned long iflags;
	unsigned long iflags;
	struct lpfc_nodelist *ndlp;
	lockdep_assert_held(&phba->hbalock);
	lockdep_assert_held(&phba->hbalock);
@@ -10810,9 +10818,13 @@ lpfc_sli_abort_iotag_issue(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
	if (phba->sli_rev == LPFC_SLI_REV4) {
	if (phba->sli_rev == LPFC_SLI_REV4) {
		iabt->un.acxri.abortIoTag = cmdiocb->sli4_xritag;
		iabt->un.acxri.abortIoTag = cmdiocb->sli4_xritag;
		iabt->un.acxri.abortContextTag = cmdiocb->iotag;
		iabt->un.acxri.abortContextTag = cmdiocb->iotag;
	}
	} else {
	else
		iabt->un.acxri.abortIoTag = icmd->ulpIoTag;
		iabt->un.acxri.abortIoTag = icmd->ulpIoTag;
		if (pring->ringno == LPFC_ELS_RING) {
			ndlp = (struct lpfc_nodelist *)(cmdiocb->context1);
			iabt->un.acxri.abortContextTag = ndlp->nlp_rpi;
		}
	}
	iabt->ulpLe = 1;
	iabt->ulpLe = 1;
	iabt->ulpClass = icmd->ulpClass;
	iabt->ulpClass = icmd->ulpClass;