From patchwork Fri May 22 14:42:41 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 6465221 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 6A8409F318 for ; Fri, 22 May 2015 14:43:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8FC6220494 for ; Fri, 22 May 2015 14:43:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A0E9720483 for ; Fri, 22 May 2015 14:43:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757298AbbEVOm6 (ORCPT ); Fri, 22 May 2015 10:42:58 -0400 Received: from mail-qg0-f46.google.com ([209.85.192.46]:33860 "EHLO mail-qg0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757237AbbEVOmz (ORCPT ); Fri, 22 May 2015 10:42:55 -0400 Received: by qgez61 with SMTP id z61so9107701qge.1 for ; Fri, 22 May 2015 07:42:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=oGgVeFcDFvXHoJZ728B+POWWB5gQUAJPpgLl1ZrMlmo=; b=k1K1ER+nGCmD8tsm1DX+UADXqR5s+4wpGii6ihvKMxXXzRlzqeLeRAy2AL778qHyTg /fn2X86hI3QmrR6WtURBsHRj20CRNfZXW+UmGz2hRukq5GqD+xOkvjeRzfUlaGKu6j+x uhYKdbvupwUbxJaidgI3VXdvc0Tjk0DUkpVXA1iGhg8gcgCuQpfXjUsCCl9MSdLGqiwl YY3vkUhbqfg+tpcFvNsulXgteMLK0Pu+kUnTJCyZi3ZMoxf5cLzy47TAH2s4QBlqQ5k4 dcY3UjmBmxmWfjMbnAlhItRYYodxb/zZoqz+CH2nLUvXjq6oTk8HPDylMhmkpD63oi4v 0esg== X-Gm-Message-State: ALoCoQnDLSTqUc+zPNQI+byGl+FEf5fJqp2aN9XvZ0xtoyec87Wjw3KhOU06neQNvXiKgTTTVEoF X-Received: by 10.55.15.87 with SMTP id z84mr18712461qkg.57.1432305774977; Fri, 22 May 2015 07:42:54 -0700 (PDT) Received: from myfc17 (c-75-67-235-135.hsd1.nh.comcast.net. [75.67.235.135]) by mx.google.com with ESMTPSA id e104sm1409727qgd.29.2015.05.22.07.42.54 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 22 May 2015 07:42:54 -0700 (PDT) Date: Fri, 22 May 2015 10:42:41 -0400 From: james.smart@avagotech.com (James Smart) To: linux-scsi@vger.kernel.org Subject: [PATCH 7/9] lpfc: Fix scsi task management error message. Message-ID: <555f4061.JF1uAXJ3MNmJF4W9%james.smart@avagotech.com> User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: James Smart Reviewed-by: Hannes Reinecke --- 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); /* 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;