Blame SOURCES/0089-scsi-scsi-qla2xxx-Log-the-status-code-if-a-firmware-.patch

3c6e85
From 807b71a6bc9d9863c6ea45e6c04e25e1938b4bd5 Mon Sep 17 00:00:00 2001
3c6e85
From: Himanshu Madhani <hmadhani@redhat.com>
3c6e85
Date: Thu, 1 Aug 2019 15:55:49 -0400
3c6e85
Subject: [PATCH 089/124] [scsi] scsi: qla2xxx: Log the status code if a
3c6e85
 firmware command fails
3c6e85
3c6e85
Message-id: <20190801155618.12650-90-hmadhani@redhat.com>
3c6e85
Patchwork-id: 267867
3c6e85
O-Subject: [RHEL 7.8 e-stor PATCH 089/118] scsi: qla2xxx: Log the status code if a firmware command fails
3c6e85
Bugzilla: 1729270
3c6e85
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
3c6e85
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
3c6e85
3c6e85
From: Bart Van Assche <bvanassche@acm.org>
3c6e85
3c6e85
Bugzilla 1729270
3c6e85
3c6e85
It is important to know why a firmware command failed. Hence log 'rval'
3c6e85
together with the values of the mailbox registers if a firwmare command
3c6e85
fails.
3c6e85
3c6e85
Cc: Himanshu Madhani <hmadhani@marvell.com>
3c6e85
Cc: Giridhar Malavali <gmalavali@marvell.com>
3c6e85
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
3c6e85
Acked-by: Himanshu Madhani <hmadhani@marvell.com>
3c6e85
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
3c6e85
(cherry picked from commit 3f918ffae8e788d70e6488598d00e0bf717d7737)
3c6e85
Signed-off-by: Himanshu Madhani <hmadhani@redhat.com>
3c6e85
Signed-off-by: Jan Stancek <jstancek@redhat.com>
3c6e85
---
3c6e85
 drivers/scsi/qla2xxx/qla_mbx.c | 4 ++--
3c6e85
 drivers/scsi/qla2xxx/qla_mr.c  | 6 +++---
3c6e85
 2 files changed, 5 insertions(+), 5 deletions(-)
3c6e85
3c6e85
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c
3c6e85
index ff660656dc4e..823fe8402b67 100644
3c6e85
--- a/drivers/scsi/qla2xxx/qla_mbx.c
3c6e85
+++ b/drivers/scsi/qla2xxx/qla_mbx.c
3c6e85
@@ -567,9 +567,9 @@ mbx_done:
3c6e85
 		    mcp->mb[0]);
3c6e85
 	} else if (rval) {
3c6e85
 		if (ql2xextended_error_logging & (ql_dbg_disc|ql_dbg_mbx)) {
3c6e85
-			pr_warn("%s [%s]-%04x:%ld: **** Failed", QL_MSGHDR,
3c6e85
+			pr_warn("%s [%s]-%04x:%ld: **** Failed=%x", QL_MSGHDR,
3c6e85
 			    dev_name(&ha->pdev->dev), 0x1020+0x800,
3c6e85
-			    vha->host_no);
3c6e85
+			    vha->host_no, rval);
3c6e85
 			mboxes = mcp->in_mb;
3c6e85
 			cnt = 4;
3c6e85
 			for (i = 0; i < ha->mbx_count && cnt; i++, mboxes >>= 1)
3c6e85
diff --git a/drivers/scsi/qla2xxx/qla_mr.c b/drivers/scsi/qla2xxx/qla_mr.c
3c6e85
index ffe2a4887b07..815d22ff35f6 100644
3c6e85
--- a/drivers/scsi/qla2xxx/qla_mr.c
3c6e85
+++ b/drivers/scsi/qla2xxx/qla_mr.c
3c6e85
@@ -271,9 +271,9 @@ premature_exit:
3c6e85
 
3c6e85
 	if (rval) {
3c6e85
 		ql_log(ql_log_warn, base_vha, 0x1163,
3c6e85
-		    "**** Failed mbx[0]=%x, mb[1]=%x, mb[2]=%x, "
3c6e85
-		    "mb[3]=%x, cmd=%x ****.\n",
3c6e85
-		    mcp->mb[0], mcp->mb[1], mcp->mb[2], mcp->mb[3], command);
3c6e85
+		       "**** Failed=%x mbx[0]=%x, mb[1]=%x, mb[2]=%x, mb[3]=%x, cmd=%x ****.\n",
3c6e85
+		       rval, mcp->mb[0], mcp->mb[1], mcp->mb[2], mcp->mb[3],
3c6e85
+		       command);
3c6e85
 	} else {
3c6e85
 		ql_dbg(ql_dbg_mbx, base_vha, 0x1164, "Done %s.\n", __func__);
3c6e85
 	}
3c6e85
-- 
3c6e85
2.13.6
3c6e85