Commit aa1c7ee7 authored by James Smart's avatar James Smart Committed by James Bottomley

[SCSI] lpfc 8.3.34: Streamline fcp underrun message printing

Signed-off-by: default avatarJames Smart <james.smart@emulex.com>
Signed-off-by: default avatarJames Bottomley <JBottomley@Parallels.com>
parent a51a1783
...@@ -3476,9 +3476,15 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd, ...@@ -3476,9 +3476,15 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
} }
lp = (uint32_t *)cmnd->sense_buffer; lp = (uint32_t *)cmnd->sense_buffer;
if (!scsi_status && (resp_info & RESID_UNDER) && /* special handling for under run conditions */
vport->cfg_log_verbose & LOG_FCP_UNDER) if (!scsi_status && (resp_info & RESID_UNDER)) {
logit = LOG_FCP_UNDER; /* don't log under runs if fcp set... */
if (vport->cfg_log_verbose & LOG_FCP)
logit = LOG_FCP_ERROR;
/* unless operator says so */
if (vport->cfg_log_verbose & LOG_FCP_UNDER)
logit = LOG_FCP_UNDER;
}
lpfc_printf_vlog(vport, KERN_WARNING, logit, lpfc_printf_vlog(vport, KERN_WARNING, logit,
"9024 FCP command x%x failed: x%x SNS x%x x%x " "9024 FCP command x%x failed: x%x SNS x%x x%x "
...@@ -3654,10 +3660,10 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn, ...@@ -3654,10 +3660,10 @@ lpfc_scsi_cmd_iocb_cmpl(struct lpfc_hba *phba, struct lpfc_iocbq *pIocbIn,
lpfc_cmd->status = IOSTAT_DRIVER_REJECT; lpfc_cmd->status = IOSTAT_DRIVER_REJECT;
else if (lpfc_cmd->status >= IOSTAT_CNT) else if (lpfc_cmd->status >= IOSTAT_CNT)
lpfc_cmd->status = IOSTAT_DEFAULT; lpfc_cmd->status = IOSTAT_DEFAULT;
if (lpfc_cmd->status == IOSTAT_FCP_RSP_ERROR if (lpfc_cmd->status == IOSTAT_FCP_RSP_ERROR &&
&& !lpfc_cmd->fcp_rsp->rspStatus3 !lpfc_cmd->fcp_rsp->rspStatus3 &&
&& (lpfc_cmd->fcp_rsp->rspStatus2 & RESID_UNDER) (lpfc_cmd->fcp_rsp->rspStatus2 & RESID_UNDER) &&
&& !(phba->cfg_log_verbose & LOG_FCP_UNDER)) !(vport->cfg_log_verbose & LOG_FCP_UNDER))
logit = 0; logit = 0;
else else
logit = LOG_FCP | LOG_FCP_UNDER; logit = LOG_FCP | LOG_FCP_UNDER;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment