summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Richardson <wfrichar@chromium.org>2013-07-12 15:53:35 -0700
committerChromeBot <chrome-bot@google.com>2013-07-15 14:10:38 -0700
commit1aab26540340085cba0fdd01d495cc3ae5e6d2a8 (patch)
treedd3f73b7c88f857238544bfbe3d2813659a03655
parent09f0e0687442e39cb4cc96db7b1aea480134b0ca (diff)
downloadchrome-ec-1aab26540340085cba0fdd01d495cc3ae5e6d2a8.tar.gz
Debug host command responses for error results too.
Just because the EC doesn't like a host command doesn't mean it doesn't send a response. When we have HC debugging on, we want to see that too. BUG=chrome-os-partner:20647 BRANCH=falco, peppy TEST=manual Run "hcdebug params" on the EC console. Run "ectool test 3 13" on the host. Before this CL, you'd see [4369.366344 HC 0x0a.0:030000000d00000030313233343536373839616263646566303132333 43536373839414243444546] [4369.367315 HC err 3] After this CL, you see: [46.979220 HC 0x0a.0:030000000d0000003031323334353637383961626364656630313233343 536373839414243444546] [46.980067 HC err 3] [46.980344 HC resp:30313233343536373839616263] Change-Id: I9416a5e4a9c643dba0ce29b589832c62634e916b Signed-off-by: Bill Richardson <wfrichar@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/61791 Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--common/host_command.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/common/host_command.c b/common/host_command.c
index 2f8d514194..c6f7ff1dc4 100644
--- a/common/host_command.c
+++ b/common/host_command.c
@@ -526,12 +526,12 @@ enum ec_status host_command_process(struct host_cmd_handler_args *args)
else
rv = cmd->handler(args);
- if (rv != EC_RES_SUCCESS) {
+ if (rv != EC_RES_SUCCESS)
CPRINTF("[%T HC err %d]\n", rv);
- } else if (hcdebug >= HCDEBUG_PARAMS && args->response_size) {
- CPRINTF("[%T HC resp:%.*h]\n",
- args->response_size, args->response);
- }
+
+ if (hcdebug >= HCDEBUG_PARAMS && args->response_size)
+ CPRINTF("[%T HC resp:%.*h]\n", args->response_size,
+ args->response);
return rv;
}