aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/lpfc/lpfc_scsi.c
diff options
context:
space:
mode:
authorJames Smart <james.smart@emulex.com>2012-08-14 14:26:06 -0400
committerJames Bottomley <JBottomley@Parallels.com>2012-09-14 12:59:24 -0400
commitaa1c7ee74a0af0a84bf6cdb0a77ad1510ec04fa9 (patch)
treebc535e993260f763973f55e52c1b7ee41cceafb3 /drivers/scsi/lpfc/lpfc_scsi.c
parenta51a17831b28001645f4442c21ba5c85329d36d2 (diff)
[SCSI] lpfc 8.3.34: Streamline fcp underrun message printing
Signed-off-by: James Smart <james.smart@emulex.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/lpfc/lpfc_scsi.c')
-rw-r--r--drivers/scsi/lpfc/lpfc_scsi.c20
1 files changed, 13 insertions, 7 deletions
diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index bb158880685c..b2c7d805bac9 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -3476,9 +3476,15 @@ lpfc_handle_fcp_err(struct lpfc_vport *vport, struct lpfc_scsi_buf *lpfc_cmd,
3476 } 3476 }
3477 lp = (uint32_t *)cmnd->sense_buffer; 3477 lp = (uint32_t *)cmnd->sense_buffer;
3478 3478
3479 if (!scsi_status && (resp_info & RESID_UNDER) && 3479 /* special handling for under run conditions */
3480 vport->cfg_log_verbose & LOG_FCP_UNDER) 3480 if (!scsi_status && (resp_info & RESID_UNDER)) {
3481 logit = LOG_FCP_UNDER; 3481 /* don't log under runs if fcp set... */
3482 if (vport->cfg_log_verbose & LOG_FCP)
3483 logit = LOG_FCP_ERROR;
3484 /* unless operator says so */
3485 if (vport->cfg_log_verbose & LOG_FCP_UNDER)
3486 logit = LOG_FCP_UNDER;
3487 }
3482 3488
3483 lpfc_printf_vlog(vport, KERN_WARNING, logit, 3489 lpfc_printf_vlog(vport, KERN_WARNING, logit,
3484 "9024 FCP command x%x failed: x%x SNS x%x x%x " 3490 "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 lpfc_cmd->status = IOSTAT_DRIVER_REJECT; 3660 lpfc_cmd->status = IOSTAT_DRIVER_REJECT;
3655 else if (lpfc_cmd->status >= IOSTAT_CNT) 3661 else if (lpfc_cmd->status >= IOSTAT_CNT)
3656 lpfc_cmd->status = IOSTAT_DEFAULT; 3662 lpfc_cmd->status = IOSTAT_DEFAULT;
3657 if (lpfc_cmd->status == IOSTAT_FCP_RSP_ERROR 3663 if (lpfc_cmd->status == IOSTAT_FCP_RSP_ERROR &&
3658 && !lpfc_cmd->fcp_rsp->rspStatus3 3664 !lpfc_cmd->fcp_rsp->rspStatus3 &&
3659 && (lpfc_cmd->fcp_rsp->rspStatus2 & RESID_UNDER) 3665 (lpfc_cmd->fcp_rsp->rspStatus2 & RESID_UNDER) &&
3660 && !(phba->cfg_log_verbose & LOG_FCP_UNDER)) 3666 !(vport->cfg_log_verbose & LOG_FCP_UNDER))
3661 logit = 0; 3667 logit = 0;
3662 else 3668 else
3663 logit = LOG_FCP | LOG_FCP_UNDER; 3669 logit = LOG_FCP | LOG_FCP_UNDER;