Commit 35184980 authored by James Smart's avatar James Smart Committed by Martin K. Petersen

scsi: lpfc: SLI path split: Refactor VMID paths

This patch refactors the VMID paths to use SLI-4 as the primary interface:

 - Conversion away from using SLI-3 iocb structures to set/access fields in
   common routines. Use the new generic get/set routines that were added.
   This move changes code from indirect structure references to using local
   variables with the generic routines.

 - Refactor routines when setting non-generic fields, to have both SLI3 and
   SLI4 specific sections. This replaces the set-as-SLI3 then translate to
   SLI4 behavior of the past.

Link: https://lore.kernel.org/r/20220225022308.16486-11-jsmart2021@gmail.comCo-developed-by: default avatarJustin Tee <justin.tee@broadcom.com>
Signed-off-by: default avatarJustin Tee <justin.tee@broadcom.com>
Signed-off-by: default avatarJames Smart <jsmart2021@gmail.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 9d41f08a
...@@ -3814,7 +3814,7 @@ lpfc_cmpl_ct_cmd_vmid(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, ...@@ -3814,7 +3814,7 @@ lpfc_cmpl_ct_cmd_vmid(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
if (cmd == SLI_CTAS_DALLAPP_ID) if (cmd == SLI_CTAS_DALLAPP_ID)
lpfc_ct_free_iocb(phba, cmdiocb); lpfc_ct_free_iocb(phba, cmdiocb);
if (lpfc_els_chk_latt(vport) || rspiocb->iocb.ulpStatus) { if (lpfc_els_chk_latt(vport) || get_job_ulpstatus(phba, rspiocb)) {
if (cmd != SLI_CTAS_DALLAPP_ID) if (cmd != SLI_CTAS_DALLAPP_ID)
return; return;
} }
......
...@@ -11920,7 +11920,8 @@ lpfc_cmpl_els_qfpa(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, ...@@ -11920,7 +11920,8 @@ lpfc_cmpl_els_qfpa(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
struct lpfc_vmid_priority_range *vmid_range = NULL; struct lpfc_vmid_priority_range *vmid_range = NULL;
u32 *data; u32 *data;
struct lpfc_dmabuf *dmabuf = cmdiocb->context2; struct lpfc_dmabuf *dmabuf = cmdiocb->context2;
IOCB_t *irsp = &rspiocb->iocb; u32 ulp_status = get_job_ulpstatus(phba, rspiocb);
u32 ulp_word4 = get_job_word4(phba, rspiocb);
u8 *pcmd, max_desc; u8 *pcmd, max_desc;
u32 len, i; u32 len, i;
struct lpfc_nodelist *ndlp = (struct lpfc_nodelist *)cmdiocb->context1; struct lpfc_nodelist *ndlp = (struct lpfc_nodelist *)cmdiocb->context1;
...@@ -11937,10 +11938,10 @@ lpfc_cmpl_els_qfpa(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb, ...@@ -11937,10 +11938,10 @@ lpfc_cmpl_els_qfpa(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
data[0], data[1]); data[0], data[1]);
goto out; goto out;
} }
if (irsp->ulpStatus) { if (ulp_status) {
lpfc_printf_vlog(vport, KERN_ERR, LOG_SLI, lpfc_printf_vlog(vport, KERN_ERR, LOG_SLI,
"6529 QFPA failed with status x%x x%x\n", "6529 QFPA failed with status x%x x%x\n",
irsp->ulpStatus, irsp->un.ulpWord[4]); ulp_status, ulp_word4);
goto out; goto out;
} }
...@@ -12139,7 +12140,8 @@ lpfc_cmpl_els_uvem(struct lpfc_hba *phba, struct lpfc_iocbq *icmdiocb, ...@@ -12139,7 +12140,8 @@ lpfc_cmpl_els_uvem(struct lpfc_hba *phba, struct lpfc_iocbq *icmdiocb,
struct lpfc_nodelist *ndlp = icmdiocb->context1; struct lpfc_nodelist *ndlp = icmdiocb->context1;
u8 *pcmd; u8 *pcmd;
u32 *data; u32 *data;
IOCB_t *irsp = &rspiocb->iocb; u32 ulp_status = get_job_ulpstatus(phba, rspiocb);
u32 ulp_word4 = get_job_word4(phba, rspiocb);
struct lpfc_dmabuf *dmabuf = icmdiocb->context2; struct lpfc_dmabuf *dmabuf = icmdiocb->context2;
struct lpfc_vmid *vmid; struct lpfc_vmid *vmid;
...@@ -12157,10 +12159,10 @@ lpfc_cmpl_els_uvem(struct lpfc_hba *phba, struct lpfc_iocbq *icmdiocb, ...@@ -12157,10 +12159,10 @@ lpfc_cmpl_els_uvem(struct lpfc_hba *phba, struct lpfc_iocbq *icmdiocb,
"4532 UVEM LS_RJT %x %x\n", data[0], data[1]); "4532 UVEM LS_RJT %x %x\n", data[0], data[1]);
goto out; goto out;
} }
if (irsp->ulpStatus) { if (ulp_status) {
lpfc_printf_vlog(vport, KERN_WARNING, LOG_SLI, lpfc_printf_vlog(vport, KERN_WARNING, LOG_SLI,
"4533 UVEM error status %x: %x\n", "4533 UVEM error status %x: %x\n",
irsp->ulpStatus, irsp->un.ulpWord[4]); ulp_status, ulp_word4);
goto out; goto out;
} }
spin_lock(&phba->hbalock); spin_lock(&phba->hbalock);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment