Skip to content

Commit cad93a0

Browse files
jsmart-ghmartinkpetersen
authored andcommitted
scsi: lpfc: SLI path split: Refactor PLOGI/PRLI/ADISC/LOGO paths
This patch refactors the PLOGI/PRLI/ADISC/LOGO 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-6-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 6831ce1 commit cad93a0

3 files changed

Lines changed: 242 additions & 105 deletions

File tree

drivers/scsi/lpfc/lpfc.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1840,6 +1840,15 @@ u16 get_job_ulpcontext(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
18401840
return iocbq->iocb.ulpContext;
18411841
}
18421842

1843+
static inline
1844+
u16 get_job_rcvoxid(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
1845+
{
1846+
if (phba->sli_rev == LPFC_SLI_REV4)
1847+
return bf_get(wqe_rcvoxid, &iocbq->wqe.generic.wqe_com);
1848+
else
1849+
return iocbq->iocb.unsli3.rcvsli3.ox_id;
1850+
}
1851+
18431852
static inline
18441853
u32 get_job_els_rsp64_did(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
18451854
{

0 commit comments

Comments
 (0)