diff options
author | Jett Rink <jettrink@chromium.org> | 2019-04-05 11:12:58 -0600 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-04-10 18:06:27 -0700 |
commit | 7276e49af34a2929f45aefcd68196daf15e0d27a (patch) | |
tree | 5976469d56c4cb948d1bf9f36d3e2626398008b0 | |
parent | 4c60f22507aebfe25c92848cd51fe5b20d479a4c (diff) | |
download | chrome-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>
-rw-r--r-- | chip/ish/heci.c | 2 | ||||
-rw-r--r-- | chip/ish/host_command_heci.c | 12 |
2 files changed, 12 insertions, 2 deletions
diff --git a/chip/ish/heci.c b/chip/ish/heci.c index 50dfd2b009..62597d6039 100644 --- a/chip/ish/heci.c +++ b/chip/ish/heci.c @@ -699,6 +699,8 @@ static int handle_client_disconnect_req( const struct heci_client_callbacks *cbs; uint8_t fw_addr; + CPRINTS("Got HECI disconnect request"); + heci_build_hbm_header(&heci_msg.hdr, sizeof(i2h->cmd) + sizeof(*client_disconnect_res)); 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 = { |