summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-04-03 20:32:25 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-04-05 03:53:26 -0700
commite0e48a3187826d03248e35313feb1e8d068439fc (patch)
tree2ea86b22a47b3064bbf0e5ac8fa5e31dd9f66595
parent907ccfb38f9d3d08a9888a0b44c0c3a28f1dc381 (diff)
downloadchrome-ec-e0e48a3187826d03248e35313feb1e8d068439fc.tar.gz
ish: print heci error messages when occur
The error message for the HECI bus should print to the console if errors occur. Only the spammy debug message should be guarded by the debug compiler option. BRANCH=none BUG=none TEST=see prints on console This exposes that we are failing to send HECI (ISHTP) messages due to a flow control issue (no cred) Change-Id: I7ca8d47531df8a206165d4b3f14cb367d9d5d745 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1553299 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Mathew King <mathewk@chromium.org>
-rw-r--r--chip/ish/heci.c6
-rw-r--r--chip/ish/ipc_heci.c9
2 files changed, 2 insertions, 13 deletions
diff --git a/chip/ish/heci.c b/chip/ish/heci.c
index 512a9393a4..50dfd2b009 100644
--- a/chip/ish/heci.c
+++ b/chip/ish/heci.c
@@ -13,15 +13,9 @@
#include "task.h"
#include "util.h"
-#ifdef DEBUG_IPC_HECI
#define CPUTS(outstr) cputs(CC_LPC, outstr)
#define CPRINTS(format, args...) cprints(CC_LPC, format, ## args)
#define CPRINTF(format, args...) cprintf(CC_LPC, format, ## args)
-#else
-#define CPUTS(outstr)
-#define CPRINTS(format, args...)
-#define CPRINTF(format, args...)
-#endif
struct heci_header {
uint8_t fw_addr;
diff --git a/chip/ish/ipc_heci.c b/chip/ish/ipc_heci.c
index 41eff37667..075a7b1267 100644
--- a/chip/ish/ipc_heci.c
+++ b/chip/ish/ipc_heci.c
@@ -32,15 +32,9 @@
#include "queue.h"
#include "hooks.h"
-#ifdef IPC_HECI_DEBUG
#define CPUTS(outstr) cputs(CC_LPC, outstr)
#define CPRINTS(format, args...) cprints(CC_LPC, format, ## args)
#define CPRINTF(format, args...) cprintf(CC_LPC, format, ## args)
-#else
-#define CPUTS(outstr)
-#define CPRINTS(format, args...)
-#define CPRINTF(format, args...)
-#endif
/*
* comminucation protocol is defined in Linux Documentation
@@ -354,9 +348,10 @@ static int ipc_get_protocol_data(const struct ipc_if_ctx *ctx,
CPRINTS("buffer is smaller than payload\n");
return -IPC_ERR_TOO_SMALL_BUFFER;
}
-
+#ifdef IPC_HECI_DEBUG
CPRINTF("ipc p=%d, db=0x%0x, payload_size=%d\n", protocol, drbl_val,
IPC_DB_MSG_LENGTH(drbl_val));
+#endif
switch (protocol) {
case IPC_PROTOCOL_HECI: