summaryrefslogtreecommitdiffstats
path: root/drivers/block/mtip32xx
diff options
context:
space:
mode:
authorAsai Thambi SP <asamymuthupa@micron.com>2016-02-25 00:16:38 -0500
committerJens Axboe <axboe@fb.com>2016-03-03 11:08:43 -0500
commit5b7e0a8ac85e2dfd83830dc9e0b3554d153a37e3 (patch)
tree7f71f9c782eebccf7074a8f3c5dee50a99615eed /drivers/block/mtip32xx
parente35b94738a2f7caa12017f69ef385cb6b8028965 (diff)
mtip32xx: Print exact time when an internal command is interrupted
Print exact time when an internal command is interrupted. Signed-off-by: Selvan Mani <smani@micron.com> Signed-off-by: Rajesh Kumar Sambandam <rsambandam@micron.com> Signed-off-by: Asai Thambi S P <asamymuthupa@micron.com> Cc: stable@vger.kernel.org Signed-off-by: Jens Axboe <axboe@fb.com>
Diffstat (limited to 'drivers/block/mtip32xx')
-rw-r--r--drivers/block/mtip32xx/mtip32xx.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/block/mtip32xx/mtip32xx.c b/drivers/block/mtip32xx/mtip32xx.c
index be9ad9ca4fe1..9ae4cc5c61ee 100644
--- a/drivers/block/mtip32xx/mtip32xx.c
+++ b/drivers/block/mtip32xx/mtip32xx.c
@@ -1092,6 +1092,7 @@ static int mtip_exec_internal_command(struct mtip_port *port,
1092 struct mtip_cmd *int_cmd; 1092 struct mtip_cmd *int_cmd;
1093 struct driver_data *dd = port->dd; 1093 struct driver_data *dd = port->dd;
1094 int rv = 0; 1094 int rv = 0;
1095 unsigned long start;
1095 1096
1096 /* Make sure the buffer is 8 byte aligned. This is asic specific. */ 1097 /* Make sure the buffer is 8 byte aligned. This is asic specific. */
1097 if (buffer & 0x00000007) { 1098 if (buffer & 0x00000007) {
@@ -1155,6 +1156,8 @@ static int mtip_exec_internal_command(struct mtip_port *port,
1155 /* Populate the command header */ 1156 /* Populate the command header */
1156 int_cmd->command_header->byte_count = 0; 1157 int_cmd->command_header->byte_count = 0;
1157 1158
1159 start = jiffies;
1160
1158 /* Issue the command to the hardware */ 1161 /* Issue the command to the hardware */
1159 mtip_issue_non_ncq_command(port, MTIP_TAG_INTERNAL); 1162 mtip_issue_non_ncq_command(port, MTIP_TAG_INTERNAL);
1160 1163
@@ -1165,8 +1168,9 @@ static int mtip_exec_internal_command(struct mtip_port *port,
1165 msecs_to_jiffies(timeout))) <= 0) { 1168 msecs_to_jiffies(timeout))) <= 0) {
1166 if (rv == -ERESTARTSYS) { /* interrupted */ 1169 if (rv == -ERESTARTSYS) { /* interrupted */
1167 dev_err(&dd->pdev->dev, 1170 dev_err(&dd->pdev->dev,
1168 "Internal command [%02X] was interrupted after %lu ms\n", 1171 "Internal command [%02X] was interrupted after %u ms\n",
1169 fis->command, timeout); 1172 fis->command,
1173 jiffies_to_msecs(jiffies - start));
1170 rv = -EINTR; 1174 rv = -EINTR;
1171 goto exec_ic_exit; 1175 goto exec_ic_exit;
1172 } else if (rv == 0) /* timeout */ 1176 } else if (rv == 0) /* timeout */