Commit 5b7e0a8a authored by Asai Thambi SP's avatar Asai Thambi SP Committed by Jens Axboe

mtip32xx: Print exact time when an internal command is interrupted

Print exact time when an internal command is interrupted.
Signed-off-by: default avatarSelvan Mani <smani@micron.com>
Signed-off-by: default avatarRajesh Kumar Sambandam <rsambandam@micron.com>
Signed-off-by: default avatarAsai Thambi S P <asamymuthupa@micron.com>
Cc: stable@vger.kernel.org
Signed-off-by: default avatarJens Axboe <axboe@fb.com>
parent e35b9473
...@@ -1092,6 +1092,7 @@ static int mtip_exec_internal_command(struct mtip_port *port, ...@@ -1092,6 +1092,7 @@ static int mtip_exec_internal_command(struct mtip_port *port,
struct mtip_cmd *int_cmd; struct mtip_cmd *int_cmd;
struct driver_data *dd = port->dd; struct driver_data *dd = port->dd;
int rv = 0; int rv = 0;
unsigned long start;
/* Make sure the buffer is 8 byte aligned. This is asic specific. */ /* Make sure the buffer is 8 byte aligned. This is asic specific. */
if (buffer & 0x00000007) { if (buffer & 0x00000007) {
...@@ -1155,6 +1156,8 @@ static int mtip_exec_internal_command(struct mtip_port *port, ...@@ -1155,6 +1156,8 @@ static int mtip_exec_internal_command(struct mtip_port *port,
/* Populate the command header */ /* Populate the command header */
int_cmd->command_header->byte_count = 0; int_cmd->command_header->byte_count = 0;
start = jiffies;
/* Issue the command to the hardware */ /* Issue the command to the hardware */
mtip_issue_non_ncq_command(port, MTIP_TAG_INTERNAL); mtip_issue_non_ncq_command(port, MTIP_TAG_INTERNAL);
...@@ -1165,8 +1168,9 @@ static int mtip_exec_internal_command(struct mtip_port *port, ...@@ -1165,8 +1168,9 @@ static int mtip_exec_internal_command(struct mtip_port *port,
msecs_to_jiffies(timeout))) <= 0) { msecs_to_jiffies(timeout))) <= 0) {
if (rv == -ERESTARTSYS) { /* interrupted */ if (rv == -ERESTARTSYS) { /* interrupted */
dev_err(&dd->pdev->dev, dev_err(&dd->pdev->dev,
"Internal command [%02X] was interrupted after %lu ms\n", "Internal command [%02X] was interrupted after %u ms\n",
fis->command, timeout); fis->command,
jiffies_to_msecs(jiffies - start));
rv = -EINTR; rv = -EINTR;
goto exec_ic_exit; goto exec_ic_exit;
} else if (rv == 0) /* timeout */ } else if (rv == 0) /* timeout */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment