scsi: lpfc: correct debug counters for abort
authorJames Smart <jsmart2021@gmail.com>
Tue, 30 Jan 2018 23:58:48 +0000 (15:58 -0800)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 12 Feb 2018 16:43:22 +0000 (11:43 -0500)
Existing code was using the wrong field for the completion status when
comparing whether to increment abort statistics

Signed-off-by: Dick Kennedy <dick.kennedy@broadcom.com>
Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/lpfc/lpfc_nvmet.c

index 8dbf5c9..7927ac4 100644 (file)
@@ -130,7 +130,7 @@ lpfc_nvmet_xmt_ls_rsp_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe,
        if (tgtp) {
                if (status) {
                        atomic_inc(&tgtp->xmt_ls_rsp_error);
-                       if (status == IOERR_ABORT_REQUESTED)
+                       if (result == IOERR_ABORT_REQUESTED)
                                atomic_inc(&tgtp->xmt_ls_rsp_aborted);
                        if (bf_get(lpfc_wcqe_c_xb, wcqe))
                                atomic_inc(&tgtp->xmt_ls_rsp_xb_set);
@@ -541,7 +541,7 @@ lpfc_nvmet_xmt_fcp_op_cmp(struct lpfc_hba *phba, struct lpfc_iocbq *cmdwqe,
                rsp->transferred_length = 0;
                if (tgtp) {
                        atomic_inc(&tgtp->xmt_fcp_rsp_error);
-                       if (status == IOERR_ABORT_REQUESTED)
+                       if (result == IOERR_ABORT_REQUESTED)
                                atomic_inc(&tgtp->xmt_fcp_rsp_aborted);
                }