Commit e514dec7 authored by David Lin's avatar David Lin Committed by Greg Kroah-Hartman

greybus: operation: print id when synchronous operation timeout

In case of a synchronous operation timeout error, it's helpful for
purpose of debugging to print the operation id in the error message, so
that we know if the response is received at a later time after operation
time out.

Testing Done:
 - Observe the error message below when response comes later after
operation timeout:

[  792.973978] greybus greybus1: 0/0:0: synchronous operation id 0x0005
of type 0x21 failed: -110
[  800.646694] greybus greybus1: 0/0:0: unexpected response id 0x0005
received
Signed-off-by: default avatarDavid Lin <dtwlin@google.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@google.com>
parent 098dfaf4
...@@ -1128,8 +1128,8 @@ int gb_operation_sync_timeout(struct gb_connection *connection, int type, ...@@ -1128,8 +1128,8 @@ int gb_operation_sync_timeout(struct gb_connection *connection, int type,
ret = gb_operation_request_send_sync_timeout(operation, timeout); ret = gb_operation_request_send_sync_timeout(operation, timeout);
if (ret) { if (ret) {
dev_err(&connection->hd->dev, dev_err(&connection->hd->dev,
"%s: synchronous operation of type 0x%02x failed: %d\n", "%s: synchronous operation id 0x%04x of type 0x%02x failed: %d\n",
connection->name, type, ret); connection->name, operation->id, type, ret);
} else { } else {
if (response_size) { if (response_size) {
memcpy(response, operation->response->payload, memcpy(response, operation->response->payload,
......
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