summaryrefslogtreecommitdiff
path: root/chip/ish/host_command_heci.c
diff options
context:
space:
mode:
authorJett Rink <jettrink@chromium.org>2019-04-05 11:12:58 -0600
committerchrome-bot <chrome-bot@chromium.org>2019-04-10 18:06:27 -0700
commit7276e49af34a2929f45aefcd68196daf15e0d27a (patch)
tree5976469d56c4cb948d1bf9f36d3e2626398008b0 /chip/ish/host_command_heci.c
parent4c60f22507aebfe25c92848cd51fe5b20d479a4c (diff)
downloadchrome-ec-7276e49af34a2929f45aefcd68196daf15e0d27a.tar.gz
ish: report errors on console
If we failed to send communication to the AP, we should log it. We should also log the disconnection path. BRANCH=none BUG=none TEST=Verify console message when HC fails Change-Id: I82a2209740c3813da64abb5c0eb4033c924c8007 Signed-off-by: Jett Rink <jettrink@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1554843 Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com> Reviewed-by: Jack Rosenthal <jrosenth@chromium.org>
Diffstat (limited to 'chip/ish/host_command_heci.c')
-rw-r--r--chip/ish/host_command_heci.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/chip/ish/host_command_heci.c b/chip/ish/host_command_heci.c
index 45e5f39fbd..daa2bbf1d6 100644
--- a/chip/ish/host_command_heci.c
+++ b/chip/ish/host_command_heci.c
@@ -64,13 +64,16 @@ void heci_send_mkbp_event(void)
static void heci_send_hostcmd_response(struct host_packet *pkt)
{
+ int rv;
struct cros_ec_ishtp_msg *out =
(struct cros_ec_ishtp_msg *)response_buffer;
out->hdr.channel = CROS_EC_COMMAND;
out->hdr.status = 0;
- heci_send_msg(heci_cros_ec_handle, (uint8_t *)out,
- pkt->response_size + CROS_EC_ISHTP_MSG_HDR_SIZE);
+ rv = heci_send_msg(heci_cros_ec_handle, (uint8_t *)out,
+ pkt->response_size + CROS_EC_ISHTP_MSG_HDR_SIZE);
+ if (rv < 0)
+ CPRINTS("HC response failed %d", -rv);
}
static void cros_ec_ishtp_subsys_new_msg_received(const heci_handle_t handle,
@@ -136,11 +139,16 @@ static int cros_ec_ishtp_no_op(const heci_handle_t heci_handle)
return EC_SUCCESS;
}
+static void cros_ec_ishtp_disconneted(const heci_handle_t heci_handle)
+{
+}
+
static const struct heci_client_callbacks cros_ec_ishtp_subsys_heci_cbs = {
.initialize = cros_ec_ishtp_subsys_initialize,
.new_msg_received = cros_ec_ishtp_subsys_new_msg_received,
.suspend = cros_ec_ishtp_no_op,
.resume = cros_ec_ishtp_no_op,
+ .disconnected = cros_ec_ishtp_disconneted,
};
static const struct heci_client cros_ec_ishtp_heci_client = {