diff options
author | James Smart <jsmart2021@gmail.com> | 2022-02-25 05:22:55 +0300 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2022-03-15 20:51:48 +0300 |
commit | 6831ce129f1948f50f2d2a57995d2ebd7a6fa0b4 (patch) | |
tree | 0bc5c388fee80efb211187934e8ecfef669874f5 /drivers/scsi/lpfc/lpfc_hw.h | |
parent | 561341425bcc70e97edf978b3041eec5cf23acef (diff) | |
download | linux-6831ce129f1948f50f2d2a57995d2ebd7a6fa0b4.tar.xz |
scsi: lpfc: SLI path split: Refactor base ELS paths and the FLOGI path
The patch refactors the general ELS handling paths to migrate to SLI-4
structures or common element abstractions. The fabric login paths are
revised as part of this patch:
- New generic lpfc_sli_prep_els_req_rsp jump table routine
- Introduce ls_rjt_error_be and ulp_bde64_le unions to correct legacy
endianness assignments
- 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.
- Clean up poor indentation on some of the ELS paths
Link: https://lore.kernel.org/r/20220225022308.16486-5-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>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_hw.h')
-rw-r--r-- | drivers/scsi/lpfc/lpfc_hw.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_hw.h b/drivers/scsi/lpfc/lpfc_hw.h index 4461c3d6fc4f..be4c0e025eeb 100644 --- a/drivers/scsi/lpfc/lpfc_hw.h +++ b/drivers/scsi/lpfc/lpfc_hw.h @@ -664,6 +664,7 @@ struct fc_vft_header { struct ls_rjt { /* Structure is in Big Endian format */ union { + __be32 ls_rjt_error_be; uint32_t lsRjtError; struct { uint8_t lsRjtRsvd0; /* FC Word 0, bit 24:31 */ @@ -4376,16 +4377,15 @@ lpfc_is_LC_HBA(unsigned short device) } /* - * Determine if an IOCB failed because of a link event or firmware reset. + * Determine if failed because of a link event or firmware reset. */ - static inline int -lpfc_error_lost_link(IOCB_t *iocbp) +lpfc_error_lost_link(u32 ulp_status, u32 ulp_word4) { - return (iocbp->ulpStatus == IOSTAT_LOCAL_REJECT && - (iocbp->un.ulpWord[4] == IOERR_SLI_ABORTED || - iocbp->un.ulpWord[4] == IOERR_LINK_DOWN || - iocbp->un.ulpWord[4] == IOERR_SLI_DOWN)); + return (ulp_status == IOSTAT_LOCAL_REJECT && + (ulp_word4 == IOERR_SLI_ABORTED || + ulp_word4 == IOERR_LINK_DOWN || + ulp_word4 == IOERR_SLI_DOWN)); } #define MENLO_TRANSPORT_TYPE 0xfe |