From patchwork Wed Apr 17 21:44:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bart Van Assche X-Patchwork-Id: 10906225 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 2DB8F1390 for ; Wed, 17 Apr 2019 21:45:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 19A6728A96 for ; Wed, 17 Apr 2019 21:45:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0DF3B28BAA; Wed, 17 Apr 2019 21:45:18 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9B06828BA9 for ; Wed, 17 Apr 2019 21:45:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387646AbfDQVpQ (ORCPT ); Wed, 17 Apr 2019 17:45:16 -0400 Received: from mail-pl1-f194.google.com ([209.85.214.194]:39703 "EHLO mail-pl1-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387921AbfDQVpI (ORCPT ); Wed, 17 Apr 2019 17:45:08 -0400 Received: by mail-pl1-f194.google.com with SMTP id a96so114020pla.6 for ; Wed, 17 Apr 2019 14:45:08 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=KjX4Qkmu49rFY0OmVSTsm6XGNnxUmdvCcA5PxODqy9Q=; b=LwoE+kgWwLWNI0eApFhOW7cr2uy4oQJSpohFPhm+zF0DjHGMKndonCVF+yvH/mulWr hWgFfEat9Q4pqM6xEY+mmQawJjknRAbzXVI38TXhas/JHx8qchKy3bksi1wreubb+FaF Tt97ZdPniT1l4XzXSnO3+DiN3yBO15DNb2FWVHxQ2HcJaZw2ByT+E5qmCU/rRGVKj7LO 0m8jtMKAtlGgo+ihhCid3wym7TxHu27EUnG3HIUDm/y/pHmVhCuwgkgIipYHSSu1He+/ fAh3Swx8pm7dImOVZ/+CHlrLixxdrADNZ4lJv98hvBmOFYmDqOZPmEjQt8u9J4+KRO7j YkvQ== X-Gm-Message-State: APjAAAUbVIfRXfBY6uyP/QtKO1kT75ye0Qzrvpa3/cwbaEQRtTULqiGy OJDmpEvmizWWFYb2r7QvIMQfa6gj X-Google-Smtp-Source: APXvYqyq2yXlZNC0U7tFYGror34EI9S2TxIGIlkzJu1TYTIrjr9XqYYzRI4uwTFcao4N1YSjhmCAvg== X-Received: by 2002:a17:902:1602:: with SMTP id g2mr2193919plg.325.1555537507600; Wed, 17 Apr 2019 14:45:07 -0700 (PDT) Received: from desktop-bart.svl.corp.google.com ([2620:15c:2cd:203:5cdc:422c:7b28:ebb5]) by smtp.gmail.com with ESMTPSA id d68sm219314pfg.16.2019.04.17.14.45.06 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 17 Apr 2019 14:45:06 -0700 (PDT) From: Bart Van Assche To: "Martin K . Petersen" , "James E . J . Bottomley" Cc: linux-scsi@vger.kernel.org, Christoph Hellwig , Bart Van Assche , Himanshu Madhani , Giridhar Malavali Subject: [PATCH 11/34] qla2xxx: Log the status code if a firmware command fails Date: Wed, 17 Apr 2019 14:44:20 -0700 Message-Id: <20190417214443.243152-12-bvanassche@acm.org> X-Mailer: git-send-email 2.20.GIT In-Reply-To: <20190417214443.243152-1-bvanassche@acm.org> References: <20190417214443.243152-1-bvanassche@acm.org> MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP It is important to know why a firmware command failed. Hence log 'rval' together with the values of the mailbox registers if a firwmare command fails. Cc: Himanshu Madhani Cc: Giridhar Malavali Signed-off-by: Bart Van Assche --- drivers/scsi/qla2xxx/qla_mbx.c | 4 ++-- drivers/scsi/qla2xxx/qla_mr.c | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index 682a26157311..133f5f6270ff 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c @@ -567,9 +567,9 @@ qla2x00_mailbox_command(scsi_qla_host_t *vha, mbx_cmd_t *mcp) mcp->mb[0]); } else if (rval) { if (ql2xextended_error_logging & (ql_dbg_disc|ql_dbg_mbx)) { - pr_warn("%s [%s]-%04x:%ld: **** Failed", QL_MSGHDR, + pr_warn("%s [%s]-%04x:%ld: **** Failed=%x", QL_MSGHDR, dev_name(&ha->pdev->dev), 0x1020+0x800, - vha->host_no); + vha->host_no, rval); mboxes = mcp->in_mb; cnt = 4; for (i = 0; i < ha->mbx_count && cnt; i++, mboxes >>= 1) diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c index 505936e3ec28..783f24db89f7 100644 --- a/drivers/scsi/qla2xxx/qla_mr.c +++ b/drivers/scsi/qla2xxx/qla_mr.c @@ -273,9 +273,9 @@ qlafx00_mailbox_command(scsi_qla_host_t *vha, struct mbx_cmd_32 *mcp) if (rval) { ql_log(ql_log_warn, base_vha, 0x1163, - "**** Failed mbx[0]=%x, mb[1]=%x, mb[2]=%x, " - "mb[3]=%x, cmd=%x ****.\n", - mcp->mb[0], mcp->mb[1], mcp->mb[2], mcp->mb[3], command); + "**** Failed=%x mbx[0]=%x, mb[1]=%x, mb[2]=%x, mb[3]=%x, cmd=%x ****.\n", + rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], mcp->mb[3], + command); } else { ql_dbg(ql_dbg_mbx, base_vha, 0x1164, "Done %s.\n", __func__); }