[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20160410183502.469782151@linuxfoundation.org>
Date: Sun, 10 Apr 2016 11:34:46 -0700
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org, Selvan Mani <smani@...ron.com>,
Rajesh Kumar Sambandam <rsambandam@...ron.com>,
Asai Thambi S P <asamymuthupa@...ron.com>,
Jens Axboe <axboe@...com>
Subject: [PATCH 4.5 109/238] mtip32xx: Print exact time when an internal command is interrupted
4.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Asai Thambi SP <asamymuthupa@...ron.com>
commit 5b7e0a8ac85e2dfd83830dc9e0b3554d153a37e3 upstream.
Print exact time when an internal command is interrupted.
Signed-off-by: Selvan Mani <smani@...ron.com>
Signed-off-by: Rajesh Kumar Sambandam <rsambandam@...ron.com>
Signed-off-by: Asai Thambi S P <asamymuthupa@...ron.com>
Signed-off-by: Jens Axboe <axboe@...com>
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/block/mtip32xx/mtip32xx.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -1092,6 +1092,7 @@ static int mtip_exec_internal_command(st
struct mtip_cmd *int_cmd;
struct driver_data *dd = port->dd;
int rv = 0;
+ unsigned long start;
/* Make sure the buffer is 8 byte aligned. This is asic specific. */
if (buffer & 0x00000007) {
@@ -1155,6 +1156,8 @@ static int mtip_exec_internal_command(st
/* Populate the command header */
int_cmd->command_header->byte_count = 0;
+ start = jiffies;
+
/* Issue the command to the hardware */
mtip_issue_non_ncq_command(port, MTIP_TAG_INTERNAL);
@@ -1165,8 +1168,9 @@ static int mtip_exec_internal_command(st
msecs_to_jiffies(timeout))) <= 0) {
if (rv == -ERESTARTSYS) { /* interrupted */
dev_err(&dd->pdev->dev,
- "Internal command [%02X] was interrupted after %lu ms\n",
- fis->command, timeout);
+ "Internal command [%02X] was interrupted after %u ms\n",
+ fis->command,
+ jiffies_to_msecs(jiffies - start));
rv = -EINTR;
goto exec_ic_exit;
} else if (rv == 0) /* timeout */
Powered by blists - more mailing lists