summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAseda Aboagye <aaboagye@google.com>2016-08-02 13:31:41 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-08-02 18:49:04 -0700
commitf5ec39ee0f70ec041eb739f931608e6ee1f96860 (patch)
treef903c80efd9fa302f01375c4618bfbce61b0833f
parent18b18474fc2c962b9ca0038b7f6762b79ff88248 (diff)
downloadchrome-ec-f5ec39ee0f70ec041eb739f931608e6ee1f96860.tar.gz
mkbp: Clear host interrupt if no more events.
BUG=chromium:633694 BRANCH=None TEST=Flash kevin; verify that no more console spam is present on the EC. Change-Id: I240fbe330952b82e2a5f97d0be7ebe4b2a8e2b46 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/365470 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org>
-rw-r--r--common/mkbp_event.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/mkbp_event.c b/common/mkbp_event.c
index 844aaf01f1..d2545f3f7e 100644
--- a/common/mkbp_event.c
+++ b/common/mkbp_event.c
@@ -84,8 +84,10 @@ static int mkbp_get_next_event(struct host_cmd_handler_args *args)
if (event_is_set((last + i) % EC_MKBP_EVENT_COUNT))
break;
- if (i == EC_MKBP_EVENT_COUNT)
+ if (i == EC_MKBP_EVENT_COUNT) {
+ set_host_interrupt(0);
return EC_RES_UNAVAILABLE;
+ }
evt = (i + last) % EC_MKBP_EVENT_COUNT;
last = evt + 1;