Skip to content

Commit 3518498

Browse files
jsmart-ghmartinkpetersen
authored andcommitted
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.com Co-developed-by: Justin Tee <justin.tee@broadcom.com> Signed-off-by: Justin Tee <justin.tee@broadcom.com> Signed-off-by: James Smart <jsmart2021@gmail.com> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
1 parent 9d41f08 commit 3518498

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

drivers/scsi/lpfc/lpfc_ct.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3814,7 +3814,7 @@ lpfc_cmpl_ct_cmd_vmid(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
38143814
if (cmd == SLI_CTAS_DALLAPP_ID)
38153815
lpfc_ct_free_iocb(phba, cmdiocb);
38163816

3817-
if (lpfc_els_chk_latt(vport) || rspiocb->iocb.ulpStatus) {
3817+
if (lpfc_els_chk_latt(vport) || get_job_ulpstatus(phba, rspiocb)) {
38183818
if (cmd != SLI_CTAS_DALLAPP_ID)
38193819
return;
38203820
}

drivers/scsi/lpfc/lpfc_els.c

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11920,7 +11920,8 @@ lpfc_cmpl_els_qfpa(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocb,
1192011920
struct lpfc_vmid_priority_range *vmid_range = NULL;
1192111921
u32 *data;
1192211922
struct lpfc_dmabuf *dmabuf = cmdiocb->context2;
11923-
IOCB_t *irsp = &rspiocb->iocb;
11923+
u32 ulp_status = get_job_ulpstatus(phba, rspiocb);
11924+
u32 ulp_word4 = get_job_word4(phba, rspiocb);
1192411925
u8 *pcmd, max_desc;
1192511926
u32 len, i;
1192611927
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,
1193711938
data[0], data[1]);
1193811939
goto out;
1193911940
}
11940-
if (irsp->ulpStatus) {
11941+
if (ulp_status) {
1194111942
lpfc_printf_vlog(vport, KERN_ERR, LOG_SLI,
1194211943
"6529 QFPA failed with status x%x x%x\n",
11943-
irsp->ulpStatus, irsp->un.ulpWord[4]);
11944+
ulp_status, ulp_word4);
1194411945
goto out;
1194511946
}
1194611947

@@ -12139,7 +12140,8 @@ lpfc_cmpl_els_uvem(struct lpfc_hba *phba, struct lpfc_iocbq *icmdiocb,
1213912140
struct lpfc_nodelist *ndlp = icmdiocb->context1;
1214012141
u8 *pcmd;
1214112142
u32 *data;
12142-
IOCB_t *irsp = &rspiocb->iocb;
12143+
u32 ulp_status = get_job_ulpstatus(phba, rspiocb);
12144+
u32 ulp_word4 = get_job_word4(phba, rspiocb);
1214312145
struct lpfc_dmabuf *dmabuf = icmdiocb->context2;
1214412146
struct lpfc_vmid *vmid;
1214512147

@@ -12157,10 +12159,10 @@ lpfc_cmpl_els_uvem(struct lpfc_hba *phba, struct lpfc_iocbq *icmdiocb,
1215712159
"4532 UVEM LS_RJT %x %x\n", data[0], data[1]);
1215812160
goto out;
1215912161
}
12160-
if (irsp->ulpStatus) {
12162+
if (ulp_status) {
1216112163
lpfc_printf_vlog(vport, KERN_WARNING, LOG_SLI,
1216212164
"4533 UVEM error status %x: %x\n",
12163-
irsp->ulpStatus, irsp->un.ulpWord[4]);
12165+
ulp_status, ulp_word4);
1216412166
goto out;
1216512167
}
1216612168
spin_lock(&phba->hbalock);

0 commit comments

Comments
 (0)