summaryrefslogtreecommitdiff
path: root/drivers/scsi/lpfc/lpfc_sli.c
diff options
context:
space:
mode:
authorJames Smart <jsmart2021@gmail.com>2022-07-02 00:14:22 +0300
committerMartin K. Petersen <martin.petersen@oracle.com>2022-07-08 00:21:44 +0300
commitb21c9deb1479bcbeea8b06c490a815690c7c86e9 (patch)
tree7a63357c7a3682bbe4d8189ce75e9a31c81d6024 /drivers/scsi/lpfc/lpfc_sli.c
parentffc566411aded3c12c63e1310fb23830e9608c59 (diff)
downloadlinux-b21c9deb1479bcbeea8b06c490a815690c7c86e9.tar.xz
scsi: lpfc: Refactor lpfc_nvmet_prep_abort_wqe() into lpfc_sli_prep_abort_xri()
lpfc_nvmet_prep_abort_wqe() has a lot of common code with lpfc_sli_prep_abort_xri(). Delete lpfc_nvmet_prep_abort_wqe() as the wqe can be filled out using the generic lpfc_sli_prep_abort_xri routine(). Add the wqec option to lpfc_sli_prep_abort_xri() for lpfc_nvmet_prep_abort_wqe(). Link: https://lore.kernel.org/r/20220701211425.2708-10-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_sli.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_sli.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/scsi/lpfc/lpfc_sli.c b/drivers/scsi/lpfc/lpfc_sli.c
index 71442faaa6c2..3aa9e5c85aa5 100644
--- a/drivers/scsi/lpfc/lpfc_sli.c
+++ b/drivers/scsi/lpfc/lpfc_sli.c
@@ -10863,7 +10863,8 @@ lpfc_sli_prep_xmit_seq64(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocbq,
static void
__lpfc_sli_prep_abort_xri_s3(struct lpfc_iocbq *cmdiocbq, u16 ulp_context,
- u16 iotag, u8 ulp_class, u16 cqid, bool ia)
+ u16 iotag, u8 ulp_class, u16 cqid, bool ia,
+ bool wqec)
{
IOCB_t *icmd = NULL;
@@ -10892,7 +10893,8 @@ __lpfc_sli_prep_abort_xri_s3(struct lpfc_iocbq *cmdiocbq, u16 ulp_context,
static void
__lpfc_sli_prep_abort_xri_s4(struct lpfc_iocbq *cmdiocbq, u16 ulp_context,
- u16 iotag, u8 ulp_class, u16 cqid, bool ia)
+ u16 iotag, u8 ulp_class, u16 cqid, bool ia,
+ bool wqec)
{
union lpfc_wqe128 *wqe;
@@ -10919,6 +10921,8 @@ __lpfc_sli_prep_abort_xri_s4(struct lpfc_iocbq *cmdiocbq, u16 ulp_context,
bf_set(wqe_qosd, &wqe->abort_cmd.wqe_com, 1);
/* Word 11 */
+ if (wqec)
+ bf_set(wqe_wqec, &wqe->abort_cmd.wqe_com, 1);
bf_set(wqe_cqid, &wqe->abort_cmd.wqe_com, cqid);
bf_set(wqe_cmd_type, &wqe->abort_cmd.wqe_com, OTHER_COMMAND);
}
@@ -10926,10 +10930,10 @@ __lpfc_sli_prep_abort_xri_s4(struct lpfc_iocbq *cmdiocbq, u16 ulp_context,
void
lpfc_sli_prep_abort_xri(struct lpfc_hba *phba, struct lpfc_iocbq *cmdiocbq,
u16 ulp_context, u16 iotag, u8 ulp_class, u16 cqid,
- bool ia)
+ bool ia, bool wqec)
{
phba->__lpfc_sli_prep_abort_xri(cmdiocbq, ulp_context, iotag, ulp_class,
- cqid, ia);
+ cqid, ia, wqec);
}
/**
@@ -12207,7 +12211,7 @@ lpfc_sli_issue_abort_iotag(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
lpfc_sli_prep_abort_xri(phba, abtsiocbp, ulp_context, iotag,
cmdiocb->iocb.ulpClass,
- LPFC_WQE_CQ_ID_DEFAULT, ia);
+ LPFC_WQE_CQ_ID_DEFAULT, ia, false);
abtsiocbp->vport = vport;
@@ -12667,7 +12671,7 @@ lpfc_sli_abort_taskmgmt(struct lpfc_vport *vport, struct lpfc_sli_ring *pring,
lpfc_sli_prep_abort_xri(phba, abtsiocbq, ulp_context, iotag,
iocbq->iocb.ulpClass, cqid,
- ia);
+ ia, false);
abtsiocbq->vport = vport;