diff mbox

[7/9] lpfc: Fix scsi task management error message.

Message ID 555f4061.JF1uAXJ3MNmJF4W9%james.smart@avagotech.com (mailing list archive)
State New, archived
Headers show

Commit Message

James Smart May 22, 2015, 2:42 p.m. UTC
Fix scsi task management error message.

TMF's were getting error messages on FCP_RSP errors (underrun). Underruns
aren't meaningful in the scenario. Change the error message to filter out
these response check errors, and don't unconditionally mark the cmd as
in error.

Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
Signed-off-by: James Smart <james.smart@avagotech.com>
---
 drivers/scsi/lpfc/lpfc_scsi.c | 18 ++++++++++--------
 1 file changed, 10 insertions(+), 8 deletions(-)

Comments

Sebastian Herbszt May 24, 2015, 8:27 p.m. UTC | #1
James Smart wrote:
> 
> Fix scsi task management error message.
> 
> TMF's were getting error messages on FCP_RSP errors (underrun). Underruns
> aren't meaningful in the scenario. Change the error message to filter out
> these response check errors, and don't unconditionally mark the cmd as
> in error.
> 
> Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
> Signed-off-by: James Smart <james.smart@avagotech.com>
> ---
>  drivers/scsi/lpfc/lpfc_scsi.c | 18 ++++++++++--------
>  1 file changed, 10 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
> index b3b195f..e5eb40d 100644
> --- a/drivers/scsi/lpfc/lpfc_scsi.c
> +++ b/drivers/scsi/lpfc/lpfc_scsi.c
> @@ -5011,13 +5011,16 @@ lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata,
>  					  iocbq, iocbqrsp, lpfc_cmd->timeout);
>  	if ((status != IOCB_SUCCESS) ||
>  	    (iocbqrsp->iocb.ulpStatus != IOSTAT_SUCCESS)) {
> -		lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
> -			 "0727 TMF %s to TGT %d LUN %llu failed (%d, %d) "
> -			 "iocb_flag x%x\n",
> -			 lpfc_taskmgmt_name(task_mgmt_cmd),
> -			 tgt_id, lun_id, iocbqrsp->iocb.ulpStatus,
> -			 iocbqrsp->iocb.un.ulpWord[4],
> -			 iocbq->iocb_flag);
> +		if (status != IOCB_SUCCESS ||
> +		    iocbqrsp->iocb.ulpStatus != IOSTAT_FCP_RSP_ERROR)
> +			lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
> +					 "0727 TMF %s to TGT %d LUN %llu "
> +					 "failed (%d, %d) iocb_flag x%x\n",
> +					 lpfc_taskmgmt_name(task_mgmt_cmd),
> +					 tgt_id, lun_id,
> +					 iocbqrsp->iocb.ulpStatus,
> +					 iocbqrsp->iocb.un.ulpWord[4],
> +					 iocbq->iocb_flag);

checkpatch suggests to not split this user-visible string.

Sebastian
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Hannes Reinecke May 25, 2015, 3:20 p.m. UTC | #2
On 05/22/2015 04:42 PM, James Smart wrote:
> 
> Fix scsi task management error message.
> 
> TMF's were getting error messages on FCP_RSP errors (underrun). Underruns
> aren't meaningful in the scenario. Change the error message to filter out
> these response check errors, and don't unconditionally mark the cmd as
> in error.
> 
> Signed-off-by: Dick Kennedy <dick.kennedy@avagotech.com>
> Signed-off-by: James Smart <james.smart@avagotech.com>
> ---
Reviewed-by: Hannes Reinecke <hare@suse.de>

Cheers,

Hannes
diff mbox

Patch

diff --git a/drivers/scsi/lpfc/lpfc_scsi.c b/drivers/scsi/lpfc/lpfc_scsi.c
index b3b195f..e5eb40d 100644
--- a/drivers/scsi/lpfc/lpfc_scsi.c
+++ b/drivers/scsi/lpfc/lpfc_scsi.c
@@ -5011,13 +5011,16 @@  lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata,
 					  iocbq, iocbqrsp, lpfc_cmd->timeout);
 	if ((status != IOCB_SUCCESS) ||
 	    (iocbqrsp->iocb.ulpStatus != IOSTAT_SUCCESS)) {
-		lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
-			 "0727 TMF %s to TGT %d LUN %llu failed (%d, %d) "
-			 "iocb_flag x%x\n",
-			 lpfc_taskmgmt_name(task_mgmt_cmd),
-			 tgt_id, lun_id, iocbqrsp->iocb.ulpStatus,
-			 iocbqrsp->iocb.un.ulpWord[4],
-			 iocbq->iocb_flag);
+		if (status != IOCB_SUCCESS ||
+		    iocbqrsp->iocb.ulpStatus != IOSTAT_FCP_RSP_ERROR)
+			lpfc_printf_vlog(vport, KERN_ERR, LOG_FCP,
+					 "0727 TMF %s to TGT %d LUN %llu "
+					 "failed (%d, %d) iocb_flag x%x\n",
+					 lpfc_taskmgmt_name(task_mgmt_cmd),
+					 tgt_id, lun_id,
+					 iocbqrsp->iocb.ulpStatus,
+					 iocbqrsp->iocb.un.ulpWord[4],
+					 iocbq->iocb_flag);
 		/* if ulpStatus != IOCB_SUCCESS, then status == IOCB_SUCCESS */
 		if (status == IOCB_SUCCESS) {
 			if (iocbqrsp->iocb.ulpStatus == IOSTAT_FCP_RSP_ERROR)
@@ -5031,7 +5034,6 @@  lpfc_send_taskmgmt(struct lpfc_vport *vport, struct lpfc_rport_data *rdata,
 		} else {
 			ret = FAILED;
 		}
-		lpfc_cmd->status = IOSTAT_DRIVER_REJECT;
 	} else
 		ret = SUCCESS;