scsi: lpfc: Correct code setting non existent bits in sli4 ABORT WQE
authorJames Smart <jsmart2021@gmail.com>
Fri, 30 Nov 2018 00:09:37 +0000 (16:09 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Sat, 8 Dec 2018 03:35:32 +0000 (22:35 -0500)
Driver is setting bits in word 10 of the SLI4 ABORT WQE (the wqid).  The
field was a carry over from a prior SLI revision. The field does not exist
in SLI4, and the action may result in an overlap with future definition of
the WQE.

Remove the setting of WQID in the ABORT WQE.

Also cleaned up WQE field settings - initialize to zero, don't bother to
set fields to zero.

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <jsmart2021@gmail.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_nvme.c
drivers/scsi/lpfc/lpfc_sli.c

index ba831def9301d87e5cdf207006164b5fa5fd3049..4c66b19e61996a80c6440211e78086a1b4257c10 100644 (file)
@@ -1855,7 +1855,6 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport,
        bf_set(abort_cmd_criteria, &abts_wqe->abort_cmd, T_XRI_TAG);
 
        /* word 7 */
-       bf_set(wqe_ct, &abts_wqe->abort_cmd.wqe_com, 0);
        bf_set(wqe_cmnd, &abts_wqe->abort_cmd.wqe_com, CMD_ABORT_XRI_CX);
        bf_set(wqe_class, &abts_wqe->abort_cmd.wqe_com,
               nvmereq_wqe->iocb.ulpClass);
@@ -1870,7 +1869,6 @@ lpfc_nvme_fcp_abort(struct nvme_fc_local_port *pnvme_lport,
               abts_buf->iotag);
 
        /* word 10 */
-       bf_set(wqe_wqid, &abts_wqe->abort_cmd.wqe_com, nvmereq_wqe->hba_wqidx);
        bf_set(wqe_qosd, &abts_wqe->abort_cmd.wqe_com, 1);
        bf_set(wqe_lenloc, &abts_wqe->abort_cmd.wqe_com, LPFC_WQE_LENLOC_NONE);
 
index 9821ab81c2f96d42e5b8436cc2948e94fb82c59c..760b819f690a30f8c8bce3e72f8172b4dc24ca15 100644 (file)
@@ -11328,19 +11328,12 @@ lpfc_sli4_abort_nvme_io(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
 
        /* Complete prepping the abort wqe and issue to the FW. */
        abts_wqe = &abtsiocbp->wqe;
-       bf_set(abort_cmd_ia, &abts_wqe->abort_cmd, 0);
-       bf_set(abort_cmd_criteria, &abts_wqe->abort_cmd, T_XRI_TAG);
-
-       /* Explicitly set reserved fields to zero.*/
-       abts_wqe->abort_cmd.rsrvd4 = 0;
-       abts_wqe->abort_cmd.rsrvd5 = 0;
 
-       /* WQE Common - word 6.  Context is XRI tag.  Set 0. */
-       bf_set(wqe_xri_tag, &abts_wqe->abort_cmd.wqe_com, 0);
-       bf_set(wqe_ctxt_tag, &abts_wqe->abort_cmd.wqe_com, 0);
+       /* Clear any stale WQE contents */
+       memset(abts_wqe, 0, sizeof(union lpfc_wqe));
+       bf_set(abort_cmd_criteria, &abts_wqe->abort_cmd, T_XRI_TAG);
 
        /* word 7 */
-       bf_set(wqe_ct, &abts_wqe->abort_cmd.wqe_com, 0);
        bf_set(wqe_cmnd, &abts_wqe->abort_cmd.wqe_com, CMD_ABORT_XRI_CX);
        bf_set(wqe_class, &abts_wqe->abort_cmd.wqe_com,
               cmdiocb->iocb.ulpClass);
@@ -11355,7 +11348,6 @@ lpfc_sli4_abort_nvme_io(struct lpfc_hba *phba, struct lpfc_sli_ring *pring,
               abtsiocbp->iotag);
 
        /* word 10 */
-       bf_set(wqe_wqid, &abts_wqe->abort_cmd.wqe_com, cmdiocb->hba_wqidx);
        bf_set(wqe_qosd, &abts_wqe->abort_cmd.wqe_com, 1);
        bf_set(wqe_lenloc, &abts_wqe->abort_cmd.wqe_com, LPFC_WQE_LENLOC_NONE);