mirror of
https://github.com/Dasharo/linux.git
synced 2026-03-06 15:25:10 -08:00
scsi: lpfc: SLI path split: Refactor CT paths
This patch refactors the CT paths to use SLI-4 as the primary interface. - Introduce generic lpfc_sli_prep_gen_req jump table routine - Introduce generic lpfc_sli_prep_xmit_seq64 jump table routine - Rename lpfcdiag_loop_post_rxbufs to lpfcdiag_sli3_loop_post_rxbufs to indicate that it is an SLI3 only path - Create new prep_wqe routine for unsolicited ELS rsp WQEs. - 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-13-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>
This commit is contained in:
committed by
Martin K. Petersen
parent
2d1928c57d
commit
61910d6a52
@@ -968,6 +968,13 @@ struct lpfc_hba {
|
||||
struct lpfc_dmabuf *bmp,
|
||||
u16 cmd_size, u32 did, u32 elscmd,
|
||||
u8 tmo, u8 expect_rsp);
|
||||
void (*__lpfc_sli_prep_gen_req)(struct lpfc_iocbq *cmdiocbq,
|
||||
struct lpfc_dmabuf *bmp, u16 rpi,
|
||||
u32 num_entry, u8 tmo);
|
||||
void (*__lpfc_sli_prep_xmit_seq64)(struct lpfc_iocbq *cmdiocbq,
|
||||
struct lpfc_dmabuf *bmp, u16 rpi,
|
||||
u16 ox_id, u32 num_entry, u8 rctl,
|
||||
u8 last_seq, u8 cr_cx_cmd);
|
||||
|
||||
/* expedite pool */
|
||||
struct lpfc_epd_pool epd_pool;
|
||||
@@ -1849,6 +1856,15 @@ u16 get_job_rcvoxid(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
|
||||
return iocbq->iocb.unsli3.rcvsli3.ox_id;
|
||||
}
|
||||
|
||||
static inline
|
||||
u32 get_job_data_placed(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
|
||||
{
|
||||
if (phba->sli_rev == LPFC_SLI_REV4)
|
||||
return iocbq->wcqe_cmpl.total_data_placed;
|
||||
else
|
||||
return iocbq->iocb.un.genreq64.bdl.bdeSize;
|
||||
}
|
||||
|
||||
static inline
|
||||
u32 get_job_els_rsp64_did(struct lpfc_hba *phba, struct lpfc_iocbq *iocbq)
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -358,6 +358,14 @@ void lpfc_sli_prep_els_req_rsp(struct lpfc_hba *phba,
|
||||
struct lpfc_vport *vport,
|
||||
struct lpfc_dmabuf *bmp, u16 cmd_size, u32 did,
|
||||
u32 elscmd, u8 tmo, u8 expect_rsp);
|
||||
void lpfc_sli_prep_gen_req(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocbq,
|
||||
struct lpfc_dmabuf *bmp, u16 rpi, u32 num_entry,
|
||||
u8 tmo);
|
||||
void lpfc_sli_prep_xmit_seq64(struct lpfc_hba *phba,
|
||||
struct lpfc_iocbq *cmdiocbq,
|
||||
struct lpfc_dmabuf *bmp, u16 rpi, u16 ox_id,
|
||||
u32 num_entry, u8 rctl, u8 last_seq,
|
||||
u8 cr_cx_cmd);
|
||||
struct lpfc_sglq *__lpfc_clear_active_sglq(struct lpfc_hba *phba, uint16_t xri);
|
||||
struct lpfc_sglq *__lpfc_sli_get_nvmet_sglq(struct lpfc_hba *phba,
|
||||
struct lpfc_iocbq *piocbq);
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -75,6 +75,7 @@ struct lpfc_iocbq {
|
||||
IOCB_t iocb; /* SLI-3 */
|
||||
struct lpfc_wcqe_complete wcqe_cmpl; /* WQE cmpl */
|
||||
|
||||
u32 unsol_rcv_len; /* Receive len in usol path */
|
||||
uint8_t num_bdes;
|
||||
uint8_t abort_bls; /* ABTS by initiator or responder */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user